Fork me on GitHub

Since I write C# at work, cannot help but think the following. If mainstream OOP languages had a tag line, it would be, "Why write 1 line when you can do the same thing in 100 lines?".

👍 4

"Common sense can be abstracted away."

😂 12

Don't forget to noodle around getting your generic constraints juuuuuuuuust right


I feel enterprisey languages spend too much time making itself idiot proof. Then there's the onslaught of unwritten rules you have to Google every damn time (IDisposable for example.) Ever tried coding in a straight jacket? While it's certainly possible, it's not recommended.


you're right! I'm guilty of idiot-proofing my own code but as soon as I try and use someone elses idiot-proofed code that insists on implementing 5 different interfaces I start cursing the heavens


since picking up Lisp(s) I try not to get involved with type system puzzle solving any more


Exercism is looking for maintainers. Perhaps you can help out with fleshing out the Clojure track?

Alex Miller (Clojure team)19:01:26

worth a post in #announcements imo


Posted there as well.


Hi, I wonder how everyone stores time. My preferred way to carry time over the wire has become the ISO 8601 format. I guess it makes sense to store that with timezone in the database. Like Postgresql supports timestamp with timezone for instance. Any opinions on that?


We store in UTC ISO 8601 timestamp with timezone on postgresql (the server timezone is set to UTC)


Beware the it's often only offset that is stored in the db, not the actual timezone. This may be a problem with daylight savings and timezone changes. Especially when you're making an app for planning events in the future or similar. This is a good read:


Thanks for the link. I decided to store timestamp with time zon and not utc after reading some more.




I prefer storing timestamps always in UTC. Dealing with timezones is error prone and I want to limit those errors to the presentation layer and leave db and business logic free from that.

👍 12

Yes, I've just linked it in another thread 🙂


my experience from fixing dates in a database: • Brasil gov decided to backdown on the DST hour change, so we got to update 2M of entries which will get invalid dates after nov 2019. • the source for the date was expressed in local time, but developer decided it would be better store them in UTC. Ghost hours can not be converted on runtime back to local time. Conclusions: • Store the data faithfull to the source. • Do convertions on runtime, don't store the converted dates • Is you're not scheduling processes represent dates as string. • Rather than writing a smart update clause, just go entry by entry by id, it will take more time, but you will know what you change in case you mess up


@valtteri Thanks I am looking at it. Back then I used the same approach, Timestamp in utc on the server, but since I started using the ISO format everyhwere it is tempting to store it like that in the database too.


Also remember to have the server and JVM configured to UTC


How about UNIX timestamps, i.e. seconds since epoch? That's timezone agnostic as well, right? I am not an expert and genuinely curious.


Well, until 2038 should be okay, for epoch until then 🙂


Someone at work was testing some stuff last month and entered a date twenty years in the future... and things broke... I hope to have retired from software development well before then 🙂


y2k38 is only 18 years plus change away! 🙂


2038 is already here. Take out a 20 year mortgage

😄 4
Lennart Buit21:01:00

Long to the rescue!


I wonder if we will see the day where IPv6 is running out of adresses when all the planets in our solar system are under bot control and every nanobot has its own IP.

Lennart Buit21:01:43

You can assign an IPv6 address to each grain of sand on approximately 340 billion planets like earth according to

👍 4

I'm sure IPv8 will be created with larger addresses, when it is needed. And then will take decades after that to become mainstream.


one can only hope by then we are finally off ip and using some kind of named data networking