Comments (6)
Though it's true that neither #36 nor the current JSON at https://github.com/exercism/x-common/blob/master/exercises/gigasecond/canonical-data.json have birthday in the set of tests, there is acknowledgment of it in the comment. I think that's as good as it's going to get here, and letting individual tracks decide whether to have it.
The date-duration arithmetic discussion qualifies as a new exercise idea and that is the unresolved part of this issue, so I'll label it to suit.
from problem-specifications.
We were talking about Gigasecond at my Kata group today. None of us particularly liked it because the tests didn't ever show off any interesting behavior. It seemed like once you got one test passing, all of them would pass. Then, if your language supports it, you could add your birthday. But your birthday isn't a weird edge case, or anything special. It's just another date.
Instead we were wondering if the Gigasecond could be expanded into a more interesting look at API design. In Ruby, at least, we liked writing methods like 1.gigaseconds_since(Time.now)
, or (2.3).gigaseconds_before(Date.yesterday)
. Other languages probably also offer ways to write interesting methods for date manipulation.
from problem-specifications.
In Go there are some really nice lessons about the standard library, the difference between constants and variables (significant in some ways in Go), about time.Duration
, type conversions, support for scientific notation, etc.
In languages where it doesn't add anything interesting in terms of ramping up in the language or in understanding some core programming concept it should either be transformed into something more interesting, or just deprecated/foregone.
I think the idea of exploring activesupport style monkeypatching/api design could be an interesting take on the problem.
from problem-specifications.
I think it's helpful for a new programmer or someone new to a language to figure out how dates are supported, or as a challenge to implement a simple date representation. I sense some untapped pedagogical potential though.
Gigasecond is a duration, a more advanced exercise, could be to exercise or implement date-duration arithmetic in the language:
date - date = duration
date +/- duration = date
duration +/- duration = duration
date + date = error
duration +/- date = error
from problem-specifications.
Duration arithmetic is a very interesting extension. I don't know if it would be as part of this exercise or a separate one. Go already has duration implemented as part of the standard library, so this exercise works as a discovery tool for how durations work. In languages where there is no such thing, it would probably turn this into a more advanced exercise.
Is it reasonable to mix the two and write a README that would leave both options open, or would it be better to separate them and then have each language track choose which of the two exercises (one or both) are appropriate to the language?
from problem-specifications.
As (very) we're short on date/time exercises, it would be great if we could create a new exercise to focus on these concepts.
Something like being passed to datetimes and having to return a description of the duration between them (e.g. "2 days ago", "3 weeks ago", etc.) could maybe work here.
from problem-specifications.
Related Issues (20)
- Use consistent writting styles for Special blocks HOT 2
- ci: should use shellcheck
- fetch-configlet: script is outdated
- fetch-configlet: consider removing scripts from this repo
- saddle-points: directions seem mixed up
- ci: workflow doesn't run on push
- scale-generator: Accepted solution for "octatonic" scale seems incorrect. HOT 1
- Yarn lock has security issues HOT 12
- Can there be negative Armstrong numbers? HOT 1
- Set up prettier for markdown files HOT 8
- `rational-numbers` missing test cases for "exponentiation of a given rational number to a real (floating-point) power" HOT 1
- "Hello World" description: is "so that it produces the string" misleading? HOT 2
- pig latin in C track HOT 2
- Exercise asks developer to write a function HOT 10
- Saddle Points: geq & leq HOT 2
- Variability of expected output in errors in Hamming exercise HOT 1
- Duplicated test cases in collatz-conjecture/canonical-data.json HOT 2
- Improve the description of square root problem HOT 4
- New test case for Phone Number exercise HOT 1
- Queen Attack Description appears to be wrong HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from problem-specifications.