HNHacker News
TopNewBestAskShowJobs

chucksmash

2,817 karma · joined December 16, 2014

submissionscomments
chucksmash··on Ask HN: How do I learn C properly?
I liked "C Programming: A Modern Approach"[1]. It has been several years but as I recall it was well suited for self study and was pretty explicit in calling out places it was talking about C99 as opposed to C89.

[1]: https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/...

chucksmash··on My favourite Git commit (2019)
I've always just gone with

52 ~line~ [edit: character] summary

Then write a book, just being sure to wrap at 72 chars. Never really considered what an optimal commit message length was.

Maybe it's something along the lines of "if you are playing poker and you can't figure out who the easy money is, the easy money is you." I've never seen a commit message, PR description, etc and thought "well that was excessive," so maybe I'm the one...

This one stood out to me: 157 lines of rationale, discussion of alternatives, etc for 22 lines of uncontroversial changes[1]. It's much more likely to be useful in and of itself as a piece of documentation than a one-liner, "Changes to prevent strcpy" though.

[1]: https://github.com/git/git/commit/c8af66ab8ad7cd78557f0f9f5e...

chucksmash··on Ask HN: Do you ever truly use your revision history?
I love reading through revision history but it's so, so easy to mess up given people and time.

We have a long history spread across several different (generations of) SCMs. I see each of the following quite often:

Most recent revisions (version A, code comments date code to the 90s):

- 2011-02-03: Migrate to git

- 2008-01-12: Migrate to SVN

- ~Fin~

Most recent revisions (version B):

- 2018-12-12: Split <X> out into own file

- ~Fin~

Most recent revisions (version C, sweet monorepo blogpost edition):

- 2019-10-01: Create monorepo for <Team/Superteam/Division>

- ~Fin~

---

It's hard to do transitions between SCMs (or between repos) right. For instance, when you follow the recommended steps for moving to a monorepo in git, the history is maintained but not shown in GitHub. It's so easy for well meaning people to destroy history or make it inaccessible for practical purposes when cleaning up dead code, reorganizing code, etc. Even if the history is still maintained (e.g. if there was a file rename in the same repository, you could use git log --follow, if you're trying to find when a particular snippet first came into existence, you can use git log -S<snippet>) but practically as soon as I run into one of the above, that's the end of the line.

chucksmash··on SETI@home shuts down after 21 years
> or reclusing themselves in some VR utopia.

Interesting that you might consider that a positive outcome. My immediate reaction is that it would be a very negative one. It feels like giving up - "it's not great out here, we can't make it better, might as well plug in and pretend."

Maybe I'm making the same mistake as people trying to apply home ec budgeting to national economies; if I just dropped everything and started playing video games it would be bad, but the same might not be true for entire civilizations who are further up the Kardashev scale than humans.

chucksmash··on Performant Front-End Architecture
Include an item on the performance checklist about not blindly following items on the performance checklist.

Now nobody who follows the checklist completely could be doing so blindly.

chucksmash··on Critical Bluetooth vulnerability in Android
> I feel like we've really devalued certain words in the past decade or so.

For sure.

> Everyone speaks like they work for marketing now.

Maybe we're so inundated that we've internalized it? A semi-related thing I've noticed: when people talk about movies now, it's never "oh I liked it, it was neat" or "it was sappy." Everybody talks about the cinematography this, the character arcs that, did you see that tracking shot??

It's weird to see the "inside baseball" aspects of movies/music/storytelling/etc creep into random conversations.

chucksmash··on Access to Wikipedia restored in Turkey after more than two and a half years
It has been nearly nine years since the US lost the capacity for manned space flight so there's a kernel of truth, /s or not.

This is an interesting time to be following along, as SpaceX just completed an in-flight abort test last weekend which was - by all appearances - a success.

According to spaceflightnow.com, the manned follow-up mission which will launch astronauts to the ISS on a Crew Dragon capsule, DM2, could happen within the next 50-100 days[1]:

> The schedule for the Demo-2 launch with Hurley and Behnken will partly be determined by a NASA decision in the coming weeks on whether to extend the length of their mission at the space station from a short-duration stay of about a week to an expedition that might last as long as several months.

> Bridenstine said the Demo-2 crew will have to undergo additional training to perform duties on the space station if NASA extends Hurley and Behnken’s mission.

> Kathy Lueders, NASA’s commercial crew program manager, suggested Friday that the Demo-2 mission might be ready for launch as soon as the first half of March.

> But it’s more likely to happen in April — at the soonest — when the space station’s crew is downsized to three people through October, assuming no U.S. crew launches in that period.

For those who missed it, the in-flight abort test itself was interesting[2].

[1]: https://spaceflightnow.com/2020/01/19/spacex-aces-final-majo...

[2]: https://youtu.be/mu5Ydz34oVc

chucksmash··on We’re approaching the limits of computer power – we need new programmers
That's a sunny view of the software of yesteryear.
chucksmash··on Teen Vogue published and then deleted an uncritical story about Facebook
> Teen Vogue actually happens to be pretty responsible journalism that usually does better than that.

On what basis do you say that?

chucksmash··on Flight stats, entertainment, and trying to crack Widevine
Perhaps clickjacking countermeasures[1].

[1]: https://cheatsheetseries.owasp.org/cheatsheets/Clickjacking_...

chucksmash··on My Business Card Runs Linux
Where's the mystery? Someone looks at what this guy did for his business card and, to paraphrase, says "Wow, look at this guy's skills. He must charge a very, very non-average amount of money for them."

Your response to this is "But actually, according to payscale.com, an average embedded software engineer only makes X."

1. Nobody likes but-actually posts.

2. Quoting average salary when someone is commenting on how non-average a guy's skillset is isn't really relevant.

chucksmash··on The Hottest New Thing in Seasteading Is Land
> Deregulation is an even playing field, so it's a tough sell to say that that's just self-interest.

Just because deregulation doesn't give you a leg up against competitors within your industry doesn't suddenly remove self-interest as a motive. Price collusion doesn't help you vis-a-vis your competitors either but it's certainly done in self-interest.

If everybody in the economy makes 10% more in nominal terms but output remains the same, nobody is better off in real terms. The industry being deregulated is just a subset of the economy though! If getting rid of a regulation makes participants in an industry which is only 2% of the economy do 10% better in nominal terms while output remains unchanged, those participants are coming out ahead in real terms by capturing a bigger piece of the economic pie.

One need resort to neither altruism nor high minded ideals to explain such an action, self-interest still suffices.

chucksmash··on We Only Hire the Trendiest (2016)
Your point is taken although I wouldn't say Node qualifies as the latest trend at this point. It feels like it has moved on to "just another tool to choose from" status to me. I suppose trendiness is relative but if you use a Google Trends search for "Isomorphic JavaScript" as a proxy for Node's trendiness[1], it was at its trendiest in 2016 and has fallen off quite a bit.

[1]: https://trends.google.com/trends/explore?date=all&geo=US&q=%...

chucksmash··on Millions of SMS messages exposed in database security lapse
The dangers of being clever. Briefly used a given LastPass, used another setup for several years, then wanted to go back to that old LastPass for something.

The LastPass password hint I'd set:

> Don't forget your LastPass password.

It wasn't some oblique hint. It was an FU from 20-something me to 30-something me that I distinctly remembered sending as soon as it saw it.

chucksmash··on The soul of a new computer company
I read the thread you linked. I don't see an example there of him treating people poorly or behaving "toxically".

I do see people who seem to have an ax to grind with the guy. Someone asks, without being too snarky, "what's the point of Joyent?" bcantrill responds in a reasonable manner in several places in the thread. Several posters decide the thread should be "what's the point of bcantrill?" and dredge up an old usenet post, engage in ad hominems, and are generally surly. His responses come across as eminently reasonable to me.

The original poster even apologizes to bcantrill for triggering a dogpile. What is he meant to have done wrong there?

chucksmash··on Is Stack Exchange in violation of NY labor law by using volunteer moderators?
Calling them transphobic when you "haven't been paying too much attention" is uncalled for.

You really should make an attempt to understand the situation before making such accusations.

chucksmash··on Congressman's phone password is 111111
Yep, pretty easy to do - especially if your pattern is recognizable or doesn't cross over itself.

"Oh hey, cool, a Σ!"

chucksmash··on Omniviolence Is Coming and the World Isn’t Ready
The article drums up a hypothetical scenario ("a semi-trailer full of autonomous drones carrying small shaped charges could kill a million New Yorkers, just for instance!") and then suggests we could counteract the Omniviolence that The World Is Not Ready for by submitting to a Panopticon society or making an AI our Philosopher King.

This is not serious minded analysis, but it's not fun either. It's just bad clickbait.

No system can stop every dedicated attacker to begin with. Technology gives people leverage in all their activities, including doing violence to one another. Writing an article in Nautilus that amounts to idle musing about a comic book villain's murderbot scheme and then trying to burnish it as Very Serious at the end with name dropping and the author's academic credentials is so lame.

chucksmash··on Fashion industry emits more carbon than flights and maritime shipping combined
You may shock yourself with what three hours a week can do for you. After years of playing the "I'm smart, I'll just figure this out myself (finally, this year)" game with my fitness goals I outsourced the planning to a trainer and have been super happy with the progress I've made. I'm definitely in better shape with three hours a week of HIIT and strength training than I was as a six day a week gym rat in high school who was making it up as I went.
chucksmash··on Four kinds of documentation
That's part of it. Plenty of working developers will also omit tests and documentation even without the feature-factory time pressure though. A lot of times, the need for technical documentation isn't even a blip on the TODO radar. If I had a dime for every README where the last change was "Initial commit" and the file only contained

# <PROJECT NAME> Service

This is the new service for <TASK>.

....I could buy a good README.

chucksmash··on The benefits of a more asynchronous workplace
> These companies main priority is not efficiency and productivity.

Still with you here...

> They have a political and social role: hire as many people as possible.

You lose me here.

Most companies are out to make as much money as possible now or in the near future. I spent the first three years of my career in QA at a total BS Jobs company (120k+ employees, lots of government contract and enterprise software work). So many people coasted, nothing ever really got done, etc. Even in a totally dysfunctional organization like that, hiring was either about backfilling attrition losses or hiring people that were expected to directly or indirectly contribute to revenue growth.

Never attribute to a vast socio-political conspiracy that which can be explained by the emergent incompetence of a large organization.

chucksmash··on Show HN: Spider Pro – easy and cheap way to scrape the internet
Don't know how much it is still true, but HN was originally implemented in arc.

The language homepage[1] says "Arc is unfinished. It's missing things you'd need to solve some types of problems. [...] The first priority right now is the core language."

Perhaps parallelism is still pending. A Ctrl-F on the tutorial doesn't turn up any hits for "process", "thread", "parallel", or "concurrency".

[1]: http://www.arclanguage.org

chucksmash··on Tectonic – TeX/LaTeX Engine in Rust
Yes, I believe that's what the GP is saying.
chucksmash··on How to adopt an “openness” mindset at work
Reading the article makes it very clear that they are not using the word in that sense.
chucksmash··on Report: Young adults more likely to live with parents than spouses
> How many elections have you voted in or been eligible to vote in where a single vote being added or removed would have changed the outcome? Zero? Cool, me too.

So if you aren't the one, single deciding vote it's not worthwhile? That's an immature approach. All the more immature because you go on to couch it in rhetoric about economics and "rationality" that amounts to nothing more than third rate sophistry.

You're not a taxi cab that has to be in service 24 hours a day to maximize utilization. You're a person with responsibilities. Your "economic rationality" is just a lazy justification for only doing what you feel like doing ("provides marginal value!") and never doing anything you don't.

If you're going to be a bum, be honest with yourself and those around you.

chucksmash··on Starship Prototype Unveiled
I think when Elon said "there will be a single seam weld" (which I also remember), he meant this in comparison to the current welds.

It's been 12 hours and I only skimmed the video, so I might be misremembering what he said. My understanding was this: Mk1 is welded from plates so at each layer of the stack you have n-1 welds holding the n plates together. My understanding of his comment was that the steel coils will wrap around the major axis of the rocket but instead of each layer containing n-1 welds to join n plates, there will just be one weld in each layer to join the beginning and end of that coil. That would still leave you with welds joining the different layers of coils but only one "seam" weld along the rocket's major axis.

chucksmash··on JSON for Modern C++
Exactly this.

If you didn't do a compilers class and you want a simple language to play around with for lexing/parsing, JSON works great. Here's the core of a probably correct JSON lexer, albeit a super inefficient one, that I whipped up in <110 lines of Python a few years ago out of curiosity[1].

By comparison, check out the state machine transitions at the heart of the cpython implementation of the csv module[2]. It's not really a fair comparison (my JSON lexer is written in Python and uses regexes, the csv parser is written in C and does not use regexes) but even ignoring how nicely the csv parser handles different csv dialects, I still find it strictly more complex.

[1]: https://github.com/chucksmash/jsonish/blob/master/jsonish/to...

[2]: https://github.com/python/cpython/blob/41c57b335330ff48af098...

chucksmash··on Programming Idioms
The flip side of the naming-things-is-hard adage in programming is that once you can name the problem you are having, the problem often evaporates before your eyes.
chucksmash··on Serverless: slower and more expensive
State is saved somewhere, sure. How many useful applications are truly stateless when considered in their entirety?

This isn't the sense in which servers are usually said to be stateless, however. A Lambda that reads and writes state from a database when invoked is not maintaining state outside of the request-response cycle itself, so it can be said to be stateless.

chucksmash··on Six U.S. Cities Make the List of Most Surveilled Places in the World
Note the population figure for Atlanta though: 501,178. They're only counting cameras and people within the city limits, not the area that most people broadly call "Atlanta".
← PreviousPage 14 of 27Next →