Hacker Newsnew | past | comments | ask | show | jobs | submit | jlc's commentslogin

I'll amplify nand2tetris.

And I'll throw in The Little Schemer and Understanding Computation. They come from a different direction than Code/nand2tetris. When I got that they all sort of meet in the middle, I found it mind-blowing.


IMO commit messages are for why.


Do you really prefer digging through years of commit messages to find why a particular line exists? It's a very impractical place for those. And good luck finding the origin of that line if there was an extensive refactor in between.

Also, how do you notify a later viewer that there's a "why" they should check? A comment that says "check commit messages for this line"? :)

Not to mention: you're losing the notes as soon as you move repositories, or worse, version control systems. Yes, I've hit the "SVN git migrate" wall way too many times. For that reason I even started leaving issue numbers in comments for when it's particularly important, in case we lose the commit<->ticket link down the line.


Typically, it isn't digging. It's the last commit, maybe the one before it, and I have tools for doing this (e.g., magit, fugitive).

I don't notify anyone, nor do I need to. When I encounter a WTF moment, I look at the commit messages. When there's nothing there, I curse the last developer.

I guess it can be fun spelunking through commit messages, though, to see when the comment was added and if it still applies.


LOL. I'm going to explain this for myself and then never look at this cursed thread again.

What is important is to clearly communicate the intent of code to the next developer (incl., yourself) who comes across it. Comments are one tool provided to do this. I write comments. I approve pull requests containing comments. But comments are not the only tool, and they're not the best one.

Now most of the time there's no particular difficulty establishing the intent of code. Sometimes, though, there's something weird, something that looks "wrong" but isn't. In those cases, I isolate the weird change using abstractions (at least a variable, but probably a function, a method, a class); I name it and any components well -- long, descriptive, using appropriate conventions; I put automated tests around it, which will fail if anyone changes it without understanding it, providing helpful and explicit error messages (where tools allow); and I write a developed, full explanation in a commit message (which IME will not be too hard to track down, if you've isolated the "weird" change using an abstraction).

That will almost always communicate the the intent. If it doesn't, I (reluctantly) comment it up.


Commit messages are the worst place for that. Someone should write a post once and for all about this myth so we can refer to it in the future.


.... sometimes, yeah. When "why" is highly temporal, it's a great fit, since that doesn't often have anything to do with the code or behavior itself - put that in the commit message, and/or in your ticketing system. It's a waste of space and a distraction / source of confusion in code.

For many other things though, it's so easy to "cover up" commit history. Changing how you indent things (or splay one line into multiple), correcting a spelling error, etc all make it dramatically harder to follow than an in-code comment, even with good tool support (which is usually mediocre at best). Of course, you can keep those changes separate, and add them to an "ignore these commits" list for git... but few teams are capable of maintaining that in the long run.

(I assume/hope you just got downvoted in a burst of emotional bikeshedding. certainly doesn't seem negative-reputation-worthy to me)


Until a few years later when you have to move the source code to a new repository or totally different source code control system and lose all the commit messages. In theory there should be a way to migrate the entire tree and keep the commit history but in practice from what I've seen that seldom happens.


Or refactor something and git no longer thinks the new files are related to the old one since there is too little overlap.


Yeah but you (or another developer) probably won't see the commit message later in the future when you come across that segment of code.


I think vs code has an extension that lets you see git info (committer and commit message) inline if you hover over a piece of code.


Git lens


Off the top of my head:

The Soul of a New Machine by Tracy Kidder

A Supposedly Fun Thing I'll Never Do Again by D.F. Wallace

Speak, Memory by Vladimir Nabokov

Anything by John McPhee

Edit: formatting


Oh! The Professor and the Madman by Simon Winchester


I love domino games. I used to play a lot of two-hand sniff (or muggins -- lots of variants). For me there's something aesthetically pleasing about games that use generic gaming equipment -- dominoes, cards, pawns, etc.


I enjoyed BBS and also Get Lamp, by the same director.

I hope I'm missing something, but I don't seem to be able to find it in its entirety, and its DVD is also sold out.

http://www.getlamp.com


For what it's worth, I (software engineer, 49) got a better job when I was 47. I got a job that I thought would be better at 46, too. But it turned out I was wrong, so I tried again.

My take, based only on my own experience, so grain of salt and all that: I think a business's status as a "startup," "enterprise," etc. makes a poor proxy for what it's like to work there. The correlation isn't zero, but there are a lot of factors. It's not simple. At any rate, it's really hard to know what working for a company will be like from the outside. It's good to have your shopping list of nice-to-haves, and it's good to ask lots of questions and try to suss a company out. But be flexible.

I've had the best experience finding work through former co-workers, people I'd like to work with again. There's a better chance of getting hired, you will have some inside knowledge of the company (good and bad) from the beginning, and you know there's at least one other person there who cares.

I'd recommend starting your job hunt immediately. Put out feelers with people you know. Look at job descriptions. Send out resumes. Work on any skills that need learning or refreshing. (But don't let perfect be the enemy of the good w/r/t skills.) Worst case: you're already having some conversations with potential employers when the axe falls. Best case: you've got a fresh job with a better salary before the axe falls -- maybe, by leaving, you even save someone else's job.

Good luck!


I wonder if there's an interesting essay behind that interface. I'll never know.


There's not. I use w3m, so there was no annoyance other than a very lightweight argument and a call for panic. Panic does not make for good public policy.

Don't panic.

Text follows:

Privacy is a thing we all say we want. You get mad when it’s invaded or mishandled. Say, when Equifax leaks your credit info, when your nudes show up on 4chan or when your health data is held ransom. But privacy is also something a lot of people are happy to trade away at a moment’s notice, for the slightest reward. We claim to want it, companies claim to provide it, neither side is really being entirely honest about the trade, and we all just kind of accept that… You don’t have any privacy online. But the latest innovations in tech are elevating questions of privacy into much larger social, moral, political and economic issues. Consider digital home security cameras, a key part of your “smart home.” Privacy-wise, they don’t seem especially novel. You want to be alerted when a “bad guy” comes to your door, but not when your neighbor walks by. So you get a camera that scans and remembers faces. Very convenient! But what do you do when it spots someone — wink, wink — “suspicious”? What happens when concerned neighbors start sharing these faces on the neighborhood social network? What if law enforcement gets in on the act? Maybe every new face is checked against sex-offender databases, or maybe Immigration and Customs Enforcement. Is that O.K.? Ring, one of the biggest doorbell-cam companies, already has a creepy neighborhood watch social network. It has filed a patent for creating a “database of suspicious persons.” Wait, that’s crazy. You don’t want to profile people. You just want peace of mind that your family is safe. You like these cameras because you can get alerted when your kids come home, and watch your dog from afar. Isn’t that cute? But where’s all that data going? Can your abusive spouse get it? Your internet company? The smart home is becoming a treasure trove of the most intimate data about your life — and there are few controls over it. Domestic abusers are already using smart-home devices to spy on their victims. And even if they don’t literally watch your videos, Congress passed rules in 2017 that allow broadband companies to track your digital data, including smart-home data. O.K., you didn’t sign up for all that. You’re really just worried about package thieves! Isn’t it your right to monitor your front door to make sure your toilet paper isn’t getting stolen? Sure, but have you ever considered the privacy of the workers delivering your toilet paper? Thanks to doorbell cameras, delivery drivers can be watched and tracked on the job. Is that O.K.? Of course, it’s about more than doorbells. Each time you buy some new device or service that trades in private information — your DNA, your location, your online activity — you are gambling on an uncertain and unprotected future. Here is the stark truth: We in the West are building a surveillance state no less totalitarian than the one the Chinese government is rigging up. But while China is doing it through government … … we are doing it through corporations and consumer products, in the absence of any real regulation that recognizes the stakes at hand. It is time to start caring about the mess of digital privacy. In fact, it’s time to panic.


Just want to point out how appropriate this reply was on many levels. The core article was about privacy and using w3m overcomes most intrusions. The presentation on the site is apparently awful, but w3m removes all that and distills the page to text. As a developer I use w3m (and previously lynx) for all these reasons, but also as a first-pass proxy for more exhaustive accessibility checks. I guess what this makes me think about, is, for the moment, while we still have access to general purpose computers, we do still have a choice in how we consume what we are forcefed. Maybe if we exercise it enough, we'll get to keep that choice. Maybe not. Worth a try.


Thanks! I like w3m because the web in general is insanely overstimulating. w3m lets me engage with the text without having to see all manner of distractions. I'm willing to accept being locked out of some sites to preserve my sanity. I also use firefox, but only as an application client for things I've already opted in to, like webmail, banking, and work-related stuff. Like you say, this is the freedom afforded to us by general purpose computers, and it's worth exercising.


Thank you for the actually useful reply to my flip comment.


This is soft paywalled (you get few articles a month) so you are sharing text that is not freely available


Did not realize that. I suppose I've never hit my limit. That or NYT can't be bothered to implement their paywall for a browser that doesn't load javascript or images. Usually (WSJ, WaPo, Bloomberg, many others) the content doesn't load at all.


We all know that novels are by definition fiction, right?


Oh man! I forgot all about Creative Computing. I loved Compute! and Compute!’s Gazette and Byte though.


Been there, almost exactly there, 15 years ago now.

0) If you are having suicidal thoughts, you should get medical attention. Even if you're not "truly" suicidal, depression/anxiety will rob you of the power you need to do things. So first things first.

1) Unless you're into building skyscrapers or bridges or something like that[1], you don't need anyone's permission to build stuff. Do it on your own time. Learn things. Have fun. Use it in the short term to give your life shape and meaning.

2) In the medium term, look for or make opportunities to use what you learn building stuff to make money. E.g., if by stuff you meant software, this could look like a skunkworks productivity booster app at the customer service job or a web app you make for a friend.

3) If you do 1 and 2 long enough; stay flexible, adjusting course as necessary; and don't let fear/complacency keep you from taking some chances now and again, you will eventually find that at some point you became a pro at building stuff (or perhaps at some related, but satisfying niche).

[1] If you're into buildings or bridges or somesuch, obviously you'll also need degrees/credentials, but steps 0-3 will still work.

Good luck.

EDIT: formatting


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: