15,025 karma · joined Apr 22, 2012 (14y ago) · 2,479 submissions
152.
You can run Java like Python now(mccue.dev ↗)
3 points · by oftenwrong · 2y ago · discuss
comment 2y ago · link · parent
I have yet to see this ever happen, despite working in Java shops using Optional heavily since it was included in the JDK. I would guess that this is due to developers using better tooling. IDEs commonly provide warnings when returning null, or when violating a "soft" nullability assertion marked by an annotation. NullPointerExceptions seem fairly rare.
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
There are alternative models that are more considerate of student happiness, such as: https://en.wikipedia.org/wiki/Summerhill_School
comment 2y ago · link · parent
Any experience with VMWare Fusion or Parallels?
The problem I had with UTM was that occasionally I would attempt to switch back to the guest, and I would find it "dead": unresponsive, no visual output. I sought help from the community on debugging the issue, but I could not determine what was occuring. My use case is perhaps not common, so not many people have run into the same issue with such a new project.
163.
Ask HN: Best tool for running a Linux desktop VM on a Apple Silicon Mac?
4 points · by oftenwrong · 2y ago · 4 comments
comment 2y ago · link · parent
comment 2y ago · link · parent
One of the authors, Michaeleen Doucleff, also wrote a book called Hunt, Gather, Parent: What Ancient Cultures Can Teach Us About the Lost Art of Raising Happy, Helpful Little Humans. It's interesting, and has some useful points to think about while parenting. However, I felt that a lot of the concepts would be difficult to apply in the WEIRD (Western, Educated, Industrialized, Rich, and Democratic) society I live in. The author acknowledges this, of course.
comment 2y ago · link · parent
comment 2y ago · link · parent
The other advantage is that cotton bags do not shed as many microplastics (the thread is almost always synthetic).
Many of the "re-usable" woven plastic bags I've acquired in recent years are of extremely poor quality. I have had to re-stitch many of them, and some had to be discarded after a very short service life.
comment 2y ago · link · parent
https://seatosummit.com/products/ultra-sil-day-pack - I've had a few different versions of this bag for years. There are also cheaper/bigger/different versions of the same sort of thing you can find online for "packable daypack".
https://nanobag.com/products/nanobag - I have heard good things about these, but I prefer a backpack because it allows me to be hands-free, or to use my hands to hold more items.
However, I would start by carrying a lightweight "single-use" plastic bag, and simply re-use it. Plastic bags are not as strong as these premium bags, but they hold up well enough to be useful in most scenarios.
comment 2y ago · link · parent
They mentioned hooded chairs and bed canopies: https://solar.lowtechmagazine.com/2015/02/restoring-the-old-...
comment 2y ago · link · parent
- git has a very useful hooks mechanism, but each user has to manage their installed hooks in their own clone. This should be made more team-compatible. Make hooks a part of the history that can be patched by anyone, and then others can update their hooks simply by pulling. A less-clunky, built-in version of https://pre-commit.com/ , basically.
- Keeping with use cases for hooks, it should be possible to apply code formatting transparently. Nobody should have to think about code formatting, ever. It's a common practice to ensure code conforms to the company's standard format. However, why can't a developer also work in their preferred format? It should be possible for the system to handle this. I work in my preferred format, but all of the committed code is actually in the company's standard format. A bidirectional transformation.
- Break down the barrier between repo and other channels of company communication. Often companies have a wiki, a document drive, a chat app, a ticket system. With the ability to include real-time collaboration in the repo, it makes it possible to unify all of these things, ideally while keeping a full history. I basically want to version control my entire company, including what all of the non-devs are producing. Fossil has some of this capability, but it hasn't captured the mainstream: https://fossil-scm.org/home/doc/trunk/www/whyallinone.md
- Make repos composable. It should be possible to include a repo in another repo in a way that isn't clunky. Submodules, subtrees and subrepos are clunky. A use case for this would be including a third party library as source. It should also be possible to take one piece of a repo, and distribute that "view" while allowing bidirectional contribution. An example use case for this would be for maintaining a public open source project simultaneously in the company monorepo and on a public forge. There are (very nice) hacks for this like https://github.com/google/copybara and https://josh-project.github.io/josh/ , but these have considerable clunk-factor. When repos can be sliced and glued like this, a lot of the monorepo vs polyrepo debate becomes unnecessary; we can have both.
- Make it easy for everyone to use a patch stacking / "branchless" workflow with Diversion. There are numerous projects to enable stacking in git, and it's ubiquitous in big tech, yet it hasn't gone mainstream. It's only a matter of time until some company brings this to the masses.
- Allow history to be viewed and maintained at varying granularity. As I'm sure you know, a common debate you will see unfolding online is between keeping a clean, manicured history, and keeping a full history of what you actually did. You see git forges try to split the difference by offering squash merges. You see people recommending --first-parent for viewing the logs without noise. To me, this all points to a pointless limitation of the tooling. Why can't I take the raw, messy, actual commit log of what I did, and then bundle those up into a non-destructive "summary" commit that appears in the log. That way, people can see the clean, summarised version of my change, but can also dive deeper and see all of the twists and turns I took while producing that change.
There is so much room to improve version control. Much like build systems, I feel like the industry standard falls short of what we know is possible. I am happy to see new developements in this space.
comment 2y ago · link · parent
comment 2y ago · link · parent
I recall one time I helped a relative diagnose and fix a problem with the plumbing at his cottage. My relative was so elated afterward because he enjoyed the evidence gathering, proposing a hypothesis, going down one path of investigation, crossing that off, going down another path, trying experiments, etc. That was all a new experience for him. I didn't want to ruin his excitement by saying what I was thinking: that it was exactly the same debugging I have done all day at work nearly every day for years, and so I did not share his excitement, although I always enjoy a good debugging session.
This is all to say that I don't think debugging should be seen as exclusively a programming skill. It's a general skill that can be applied to certain types of problem solving. I probably learned it initially by playing with toys like train sets and wooden blocks. Later, I would use it when repairing things around the home. The schools I attended never attempted to teach debugging. My parents never knew how to debug. I think it is a useful skill for any person to know, but maybe I am biased. If we wanted to, we could teach children how to do it with physical mechanisms, and it would probably be intuitive, and maybe even fun.
comment 2y ago · link · parent
I will add that layers are an imperfect solution, but they are, IMO, simple and practical, and have provided value in a way that is relatively unobtrustive. In other words, many people have gained value from layers without having to think much about them.
177.
Alleged Decline in Transportation Trips Is the Result of Bad Data Analysis(usa.streetsblog.org ↗)
2 points · by oftenwrong · 2y ago · discuss
comment 2y ago · link · parent