Readit News logoReadit News
kosmotaur commented on Philips Hue will soon force users to create an account   defcon.social/@mysk/11109... · Posted by u/linker3000
skunkworker · 2 years ago
This is a disappointing if not unexpected update. I currently have a hue bridge for some hue ambiance bulbs but also have control through HA. There have been some needed bulb updates (improving the stability of last color temp and state on power on) but I will soon fully transition over to HA with a zigbee adapter because of stuff like this.
kosmotaur · 2 years ago
what's HA?
kosmotaur commented on DRY is an over-rated programming principle?   gordonc.bearblog.dev/dry-... · Posted by u/gcassie
codesnik · 3 years ago
I sometimes use term "mid-level engineer syndrome", for "too many levels of abstraction in the codebase". It is very common in my experience. And untangling it's usually harder then extracting common stuff from "dumb" code. I usually don't DRY things up until three repetitions. And in test code - try to not DRY at all, copypaste is a friend of readable and mantainable specs.
kosmotaur · 3 years ago
> copypaste is a friend of readable and mantainable specs

Another generic statement: copypaste (as I understand you mean the opposite of extracting common code) between specs goes against single responsibility. Rather than `setupUser()` you open a connection, create a user fixture, write it to the db, and then paste that across all the specs. Doing quite a lot.

I can imagine a spec with let's say 20 cases. Arrangement of each takes about 6 lines to load something, change some state the test subject depends on, the usual stuff, like in the above example.

A week from now, 10 cases need an extra line of setup, which you dutifully paste across the specs which require them. You put it somewhere in the middle, as it needs an id from the first step of 6.

This happens once or twice. The commonality of the original 6 copy pasted all over the place is hashed up, interspersed with calls specific to each test. The linking factor between those 6 lines is now obscured and requiring careful analysis if only those 6 need to change.

This can be avoided if you extract the common bits out early on. Rule of three is your friend if you don't want to rush it.

kosmotaur commented on My Path to Financial Independence as a Software Engineer   software.rajivprab.com/20... · Posted by u/ingve
kolinko · 4 years ago
Stock options - it's mentioned in the article.
kosmotaur · 4 years ago
What proportion that must have been compared to the base! Even if it was 60% the base is still mind blowing.
kosmotaur commented on My Path to Financial Independence as a Software Engineer   software.rajivprab.com/20... · Posted by u/ingve
kosmotaur · 4 years ago
625k a year? Doing what exactly? Good for you, but I have never seen a spec with even a third of that salary. Or is it that it's only FAANG who's paying that big?
kosmotaur commented on Ask HN: Who Is Firing?    · Posted by u/justforfunhere
kosmotaur · 5 years ago
Equal Experts UK replaced me with a cheaper offshore contractor

u/kosmotaur

KarmaCake day15April 16, 2020View Original