1,094 karma · joined July 28, 2013
GitHub: https://github.com/astockwell
Twitter: https://twitter.com/astockwell
Site: http://astockwell.com
Edit: Saw your note below > "150+ lbs, the past decade"
Currently my advice to them is ditch VS Code and download GoLand, the editor change is jarring but the experience is much more fluid on Windows overall. Also transparent support for modules, per project.
For compiling when your code (or a package you're using, e.g. sqlite) has a cgo dependency - afaik YES you will need to go down the dark road of cygwin/Mingw, if you want your development cycle to be at all normal... and even then, my observation is compilation times are an order of magnitude slower on Windows :(
At GopherCon I met folks who worked for huge, "old guard" Windows companies who said "just run a linux VM" to develop in Go.
If you just need to compile for windows once and a while (e.g. for releases only, not as part of your normal dev cycle), check out xgo [1], which uses docker to deal with all the cgo mess. No cygwin/Mingw to install/worry about.
Best of luck! If anyone else has tips for working in Windows, I'd also love to hear them.
Am I the only one who has done this and used append() within a loop, and resulted in a slice that is 2x as long as the original desired length, and the first 1x of items are all empty?
I quickly caught it and fixed the approach (instead of append, I used the `i` as the insertion index into my new empty slice which already had capacity allocated), but the ease with which that subtlety could be overlooked turned me off to this approach unless I profile and really find it's a hot path.
Edit to add: I tried his code, and it resulted in the new slice being as expected.
I'm an American citizen and not a single one of the 6+ W2 jobs I've held have quoted the base salary with insurance premiums deducted.
And before someone bemoans the taxes, let me clarify that those medical premiums and ER visits are AFTER-TAX dollars, so add an additional 15-30% on top.
It's not until some poor, senior engineer, who is probably one of their best staff, has a stellar reputation, and genuinely cares about their job, their team, the product, and the company ... they have to fall on the sword and TELL management what's going happen: we're not shipping this yet, IT IS NOT SAFE. Then that goes all the way up the chain, management at every level wrings their hands, "how oh how did this happen?" (although they specifically are talking about the missed deadline, not the safety concerns). It gets high enough that feeling is overcome by senior leadership wrath, which flows back down, and ultimately that engineer and their entire team is punished.
What a dumpster fire.
Talk about the tag line for the past decade.
‘go mod init vendored’?
I was taken aback by how many times I had to argue with my team, our sister teams, our consultants/contractors, and even our (non-technical) leadership about NOT building a SPA when we came across 1 form in our large codebase that required some extra interactivity.
For some reason many developers seem to be fine turning a blind eye to the actual page-rendering time, maybe because it's hard to benchmark with tools? (although I'm skeptical of that). I find an overlap however in that those same developers seem to not understand why multiple database query roundtrips are worse than 1 query followed by some in-memory munging.
I'm sure I'm biased by my background, where we were profiling like mad, doing crazy things like purposely modifying images/hand-building sprites to pack better, minifying CSS before SASS/LESS existed, and every millisecond to finish rendering mattered. Good times.
The business is almost never paying to you clean up technical debt. They are paying you to generate revenue (or save costs). Period. It could be the best architected system in the world, but if it takes 4x as long to build, and the "quick and dirty" version can ship and generate revenue earlier, then that is the way the business will want to go (even with an elevated error/loss rate). My takeaway: If you do not intimately understand exactly how what you do each day makes the business more money, or saves the business more money, then you need to pause and figure that out.
Nobody gets credit for building a system that never goes down. It does not speak for itself (much as I would like it to). As others have pointed out, it's critical to communicate the value (see point above) of what you are doing, and communicate it to the people who matter.
Dealing with Humans (incompetent and otherwise) is actually what most of us get paid for (or at least it's a big share of why we get paid). Dealing with bureaucracy, red tape, incompetence, things taking too long, etc... Sometimes I wonder why I have to wait for others who are slow, don't they realize how much money is being wasted?! But it's true, the human component of our jobs is the main reason why we haven't already been replaced by others/computers. Relationships trump even adding business value (point 1 above): if you are difficult to work with, but add value, you will still be marginalized (or even let go). However on the flip side, if you are great to get along with but do little-to-nothing, you may not thrive, but you will survive.