News for hackers. Stuff that matters.

andorov

Re:Every Programmer Should Know #1: Idempotency on Monday December 11, 2023 @01:41PM (#38603627)
I always remember this from the example my professor gave -

   'raise the control rods by 1 inch' 
vs 'raise the control rods to a height of 4 inches'
Re:The Costs of Microservices on Monday October 30, 2023 @01:01PM (#38072173)
I've been using the term 'macro-services' to describe this middle ground.
Re:Upsert in SQL on Monday September 25, 2023 @05:22PM (#37650837)
worth re-upping -

postgres requests an id from the sequence for each row of the incoming data ahead of time since it doesn't know which rows are updates and which are inserts (although presumably this could be changed?). the sequence doesn't reset down for the unused so this can eat through it unexpectedly quickly if you have a table with a relatively large volume of updates.

also as a tip if you hit the max integer for the sequence and need space to implement a fundamental fix you can quickly change the sequence to start at -1 and go down. there's no issue with negative ids since they're also integers.

Re:Andreas Kling – Failure is also a habit on Friday July 07, 2023 @03:21PM (#36637017)
Similar quote from Lao Tzu. I like the inclusion thoughts -> words -> actions.

"Watch your thoughts, they become your words;

watch your words, they become your actions;

watch your actions, they become your habits;

watch your habits, they become your character;

watch your character, it becomes your destiny."

Re:Nine ways to shoot yourself in the foot with PostgreSQL on Tuesday April 25, 2023 @11:56AM (#35702235)
this also matters if you do a lot of upserts on a table that are predominantly updates. postgres requests an id from the sequence for each row of the incoming data ahead of time since it doesn't know which rows are updates and which are inserts. the sequence doesn't reset down for the unused so this can eat through it unexpectedly quickly.

if you hit the max integer for the sequence and need space to implement a fundamental fix you can quickly change the sequence to start at -1 and go down. there's no issue with negative ids since they're also integers.

Re:Space Elevator on Thursday April 20, 2023 @11:00AM (#35641156)
SpinLaunch is pretty interesting too - throwing ships into space https://www.spinlaunch.com/
Re:A Trick to Reaching Flow on Wednesday April 05, 2023 @01:13PM (#35457369)
Hemmingway would leave off writing for the day in the middle of a sentence for the same reason.
In my experience people are inaccurately pessimistic, in part due to a lack of imagination. So risk assessment that's more accurate will present as more optimistic.
DRY needs to be balanced with SRP (Single Responsibility Principle). You can legitimately have two functions that are exactly the same but they should not be DRY'd up if they are actually serving different purposes.

The use cases will likely diverge in the future, and if the functions are DRY'd making changes will make introducing bugs from the calling code that you're not working on easy. Eventually the single function will likely have a lot of conditions in it, which is a red flag for this situation.

Re:How New Ideas Arise on Sunday February 05, 2023 @06:42PM (#34671122)
Ramanujan attributed all of his conjectures to being visited by a goddess in his dreams.

https://kristinposehn.substack.com/p/ramanujan-dreams?r=feux...

Re:My “Favorite” Magtape Story on Monday January 30, 2023 @01:32PM (#34584256)
the Magic / More Magic switch is a favorite http://www.catb.org/jargon/html/magic-story.html
Re:The Guide to Software Architecture Documentation on Tuesday January 24, 2023 @04:06PM (#34510378)
Also changes to the diagram (at a certain resolution) require looping in specific senior people for review.
Re:The Spaceballs Argument for Unconditional Basic Income on Wednesday January 11, 2023 @04:00PM (#34344733)
I'm not presenting an argument against UBI - I am pointing out that his argument is flawed.

Small tribes of humans defending hunting/foraging grounds is a state of pre-civilization. Life required work then too, and things were worse. His premise is that things used to be better and we've made it worse. Hard disagree.

Re:The Spaceballs Argument for Unconditional Basic Income on Wednesday January 11, 2023 @02:58PM (#34343757)
> Land used to exist without a monetary cost to access it. That was the natural way of things prior to the private property system and monetary system.

All land / resources were staked out by small tribes of humans who might kill you for using it?

What about the disk being reused by another process without being thoroughly wiped by AWS?
Re:Questions about the hard limits of human intelligence on Monday September 12, 2022 @01:35PM (#32813823)
We can't even fully understand chess (or even checkers), in the way that we can completely understand tic-tac-toe.
Re:Why we ignore thousands of daily car crashes on Thursday July 21, 2022 @05:23PM (#32185269)
You can buy clips that prevent the beeping.

The top result is also a bottle opener... https://www.amazon.com/seat-belt-buckle-alarm-stopper/s?k=se...

Re:Dangerous Gift on Friday June 03, 2022 @09:22PM (#31615870)
I got flagged for paying a friend back for "cuban food"...
Re:The rise of remote work may reshape college towns on Friday June 04, 2021 @11:56AM (#27394907)
computer science is applied math, and software engineering is applied philosophy
Re:X-COM on Tuesday September 22, 2020 @01:30PM (#24557385)
Heh also firing a stun grenade into your ship at the end of a mission. Promotions for everyone!
Re:Upsert anti-pattern in SQL Server on Friday September 04, 2020 @04:48PM (#24378738)
Thank you for your work! Postgres is great to use and the regular release of useful features has been a very nice benefit.

One unobvious (to me) but possibly necessary side effect of the INSERT...ON CONFLICT pattern is that it reserves a primary id for every row ahead of time, presumably because it does not know what will be updated and what will be inserted. We have a heavily updated table that started failing inserts one day because the primary id sequence hit the max int (2.1b), despite the table only reaching 100mm rows. The immediate fix was to reset the sequence to -1 and have it start going down...

What if someone hacks it to intentionally blind you?
Re:Learning at work is work, and we must make space for it on Wednesday December 11, 2019 @12:41PM (#21764800)
I found that studying philosophy has had an extremely useful application to software development and architecture.
Re:Four kinds of documentation on Friday October 18, 2019 @09:33AM (#21291203)
I think it is also useful to be aware of the specific terms your team might need and introduce words to those more abstract concepts. This frequently happens with naming specific code patterns or important classes in the code, but can also be for how the team operates in general. A DSL for how your team operates.
Re:Computational survivalist on Thursday October 10, 2019 @04:25PM (#21218802)
This one too - 10 pages of Pascal to six shell commands https://leancrew.com/all-this/2011/12/more-shell-less-egg/
Re:The “greased sled” theory of Stonehenge on Thursday July 25, 2019 @08:40AM (#20524836)
In Peru I saw are several very large stones sitting on the trail between the quarry and a partially finished temple. One of them at the bottom of a very steep hill. Our guide did speculate that getting the stones on site was a gradual process.
Re:Morocco abruptly drops clock change on Saturday October 27, 2018 @03:03PM (#18317196)
Reminds me of Computerphile's The Problem with Time & Timezones - https://www.youtube.com/watch?v=-5wpm-gesOY
Re:Lead: America's Real Criminal Element (2013) on Wednesday June 20, 2018 @01:24PM (#17357453)
it's likely a society that has reached the point where it has the economic means & political will to replace lead pipes is also improving schools / etc at that point
In most cases wouldn't you send a drone instead?
Re:Snap values itself at nearly $24B with its IPO pricing on Wednesday March 01, 2017 @05:10PM (#13768993)
The oldest demographic age target for their advertising is 35+

Older »