Live data from Hacker News

Challenging projects every programmer should try (2019)

austinhenley.com

261–270 of 346 posts

Re: Challenging projects every programmer should try (2019)

#261

Earlier quoted context omitted.

> The difference with a web search engine is that nobody today can build such a thing completely from scratch I'm sorry, but can you substantiate this claim? I've seen no indication that a search engine is not buildable from scratch at all.

Assuming you get the TCP/IP stack for free, you still need to build fully-featured HTTPS and a "webscale" multi-server database for document storage from scratch. The crawler is easy and so is something like PageRank, but then building the sharded keyword text search engine itself that operates at webscale is a whole other project... The point is that it's too much work for a single person to build all the parts them…

Simple methods of search like exact matching are very fast using textbook algorithms. There are well known algorithm like suffix tree which could search in millions of documents in milliseconds.

Re: Challenging projects every programmer should try (2019)

#262
post #24

While writing a text editor, a compiler, an operating system, or a raytracer might make you a better programmer, it won't make you a better software engineer. In fact, it might make you worse at software engineering, because it embodies the disastrous "Not Invented Here" doctrine. Hackers like to obsess about Big-O, data structures, HoTT, and other high-theory stuff, yet the following skills, essential for software e…

Idk why everyone is piling on this comment, they clearly make a distinction between programming and software engineer.

Re: Challenging projects every programmer should try (2019)

#263

On the text editor one: > The biggest challenge is figuring out how to store the text document in memory. My first thought was to use an array, but that has horrible performance if the user inserts text anywhere other than the end of the document. I guess this is only an issue in low level languages, as I just used a JavaScript string and I don't think it's been a perf issue in 2+ years using my editor full time. Ple…

If everything else is even less efficient than string management, then string management does not turn up as a bottleneck.

Re: Challenging projects every programmer should try (2019)

#264
post #139

Earlier quoted context omitted.

This is just wrong. Understanding the difference between O(1), O(n) etc is essential for literally everyone who writes code. Every single programmer is better with this understanding than without it. You should know the complexity of the code you write - and most of the time that doesn't even require actively thinking about it. If you know the basics of complexity analysis it's just intuitive.

> Understanding the difference between O(1), O(n) etc is essential for literally everyone who writes code. No it isn’t. It’s a great thing to learn and understand, and essential for designing and maintaining data-intensive systems, but your statement simply isn’t true.

Sure, you don't strictly need it to write working code. But you will very quickly run into situations where you're writing unnecessarily slow code because you don't know what you're doing.

To me, it's essential.

Re: Challenging projects every programmer should try (2019)

#265

What’s with many programmers’ obsession with writing their own text editors? In part a rhetorical question, but it still boggles me. Not that many people that are obsessed with manufacturing their own hammers and nails, for example, hence why I’m asking.

It's a nice self-contained project that's relatively easy to make fast progress on, while also being challenging. Plus it's something that programmers have to use every day so we're bound to have pain points with existing options.

Re: Challenging projects every programmer should try (2019)

#266
post #107

Earlier quoted context omitted.

I don't understand why you think a search engine requires the use of "real engineering skills" like picking and choosing libraries and identifying which opportunities will yield fruitful optimization. Literally all of the listed projects, text editors, compilers, operating systems, and ray tracers, can exercise the exact same activities. I'm more inclined to think that your comment is really more revealing about what…

> Literally all of the listed projects, text editors, compilers, operating systems, and ray tracers, can exercise the exact same activities. In the linked article, these projects are all explicitly described as opportunities to learn about low-level stuff like how to efficiently store editable text. The difference with a web search engine is that nobody today can build such a thing completely from scratch, therefore…

While nih is ultimately dependent on multiple different aspects, I would argue that, ironically, it's more likely to create nih-qualifying product with your aproach.

Because when you write things from scratch, you actually have the space to innovate. But when building product with preexisting puzzles, there is much less space to actually make any usefull changes that would make your product actually standout from existing alternatives (which nih is all about)

Re: Challenging projects every programmer should try (2019)

#267
post #211

Earlier quoted context omitted.

> Every CS graduate can implement Paxos. I have lived evidence that not nearly every CS graduate even knows about the topic that Paxos addresses.

Where in the world can you get a computer science degree without hearing about consensus algorithms?

You’ve just shifted the goalpost twice here. I never learned about Paxos, but I did learn about consensus algorithms. Second, learning about something, and implementing something are completely different. Most CS graduates have an idea of how syntax parsing works. How many can implement a parser? What about a syntax highlighter? Most graduates have an idea of how an OS works. How many can build an OS?

I guess if you’re always using libraries though, you may mistakenly be thinking that these libraries are just doing trivial work. Once you dive in and try to implement the low level stuff, then you realize how big of a disconnect there is between a fuzzy idea in your head and the lines of code that constitute that idea in reality.

Re: Challenging projects every programmer should try (2019)

#268
post #45
post #32

I would really love to try my hands on something much more physical, like a robot; or a drone with autopilot; maybe accurate simulation of flight dynamics of a spaceplane with programmable GNC parameters? I have a copy of "Fundamentals of Astrodynamics" by Bate, Mueller et al and I would love to do something with it this holiday season. I say simulation because all the rest of the stuff seems to cost a lot. I am real…

I bet a self-balancing two-wheeled robot would be a fun (and relatively safe) project. I mean a Segway-like thing that can just stand in one place without falling over or yeeting itself off the table. You'd need a microcontroller, an IMU, a stepper motor controller, a motor, some LEGO wheels, and maybe a block of wood. I haven't tried this, so my guesses are probably way off.

Sounds like a good project to me (we did this for a couple of labs in an undergraduate [sophomore maybe junior year] control systems class). The "inverted pendulum" problem and its subsequent derivations should be a good model for this. When the object is nearly upright (or at small angles from the vertical axis) a nice linear control loop should suffice but if you leave that region the control solution becomes more difficult (would make a good target for improvement after initially getting it going).

Re: Challenging projects every programmer should try (2019)

#269

Total long shot. But does anyone have any good side projects that would center around simulating fluid dynamics? I’ve always been interested in aerodynamics and I’ve wanted to see if there is a way to learn more about it with my programming skills.

I DO! PICK ME PICK ME!!!

First, be aware of FluidX3d [0] [1] - which is awesome for CFD simulations, OSS, etc...

Here is the premise of the CFD question:

It has long been known that Eddies [2] were studied by da vinci - and he was the first to propose the eddy pump... and how eddies work in hydrodynamics - and aerodynamics.

The barnacles on the leading edge of a Wales fin is also thought to cause beneficial eddies in the fin's ability to cut through water more efficiently with less drag.

Dimples on a golf ball affect the air-flow in tiny micro eddies, but at extraordinary speeds - where (I surmise) a certain amount of 'cavitation' may occur with a very thin film around the ball - kind of like water-tension, but with tiny eddies [4]

SO:

Create a Helicopter blade with leading-edge 'Barnacles' similar to the shapes of the Acorn barnacles on wale fins, which will create eddies as the air passes/affect the flow of the air over the foil.

Add dimples of varying shape profiles (such as convex round dimples to hexagonally based dimples (much easier in aircraft which are already based on titanium honey-comb-sandwhich materil)

But make the dimples morphic - being able to electrostaticly "activate" the dimples (meaning they are either on or off for the simulation)

The goal is to determine the characteristic of having dimples and/or barnacles have a net positive impact on the flow and conditions of air over a foil in the helicoptor blade - or the fixed wing of larger craft - or the entire fuselage dimpled like a golf-ball affecting fuel efficiency or other factors of lift or flight that could be visualized easily using something like [0]

[0.0] https://github.com/ProjectPhysX/FluidX3D

[0.1] https://www.youtube.com/watch?v=mhacLfz92h0 [1] https://www.reddit.com/r/CFD/comments/10ghc2d/fluidx3d_blows...

[2] https://theconversation.com/how-leonardo-da-vinci-master-of-...

[3] https://marinesanctuary.org/blog/whales-and-barnacles-an-unl...

[4] https://www.scientificamerican.com/article/how-do-dimples-in...

Re: Challenging projects every programmer should try (2019)

#270

Earlier quoted context omitted.

Sebastian Lague recently did a video on simulating fluids, which may be interesting. As always, he takes a "from scratch" approach to it. https://youtu.be/rSKMYc1CQHE?si=pXdsHlQSCpw8nY8m The GitHub repository also contains links to some of the research papers used to implement the simulation. https://github.com/SebLague/Fluid-Sim

I recently went this route. I didn’t want to set up or use Unity so I wrote my own 2D fluid simulator based on some of the same papers using Metal compute shaders (though I’d love to try again using webgpu). Sebastian’s video is great and the implementation is good. But this was a great (and fun) opportunity to look for ways to improve on it. For starters, the way he’s doing the spatial lookup has poor cache performa…

See my post in this thread about dimples/barnacles...

But have you seen this guys package: https://github.com/ProjectPhysX/FluidX3D

Post reply on HN