Live data from Hacker News

Software Development at 1 Hz

medium.com

71–80 of 121 posts

Re: Software Development at 1 Hz

#71
post #15

My dev-loop currently takes ~10sec. But I worked with worse... Yes I prefer faster loops, but nerver had a job where I could influence the build pipeline...

I just try and fix the build pipeline when it annoys me.

I was running into some 1-minute link times per project on Android, with several projects. Investigated and found out there was an alternative linker named "gold" - a few minutes to figure out how to reconfigure our builds and our link times were down to ~10 seconds / project or something. Nobody complained when I checked that in ;)

Dealing with C++ build pipelines for large projects, there's only so low I can get build times for the whole project - better to try and make the data hot reloadable in a lot of cases. Similar goal: Fast iteration loops. Even if you can't fix them for the entire project, you may be able to fix them for whatever you're working on right now.

Re: Software Development at 1 Hz

#72

Earlier quoted context omitted.

>>"I quite strongly discourage teaching programming by starting with IDEs..." >>"...also happens if you give them a debugger..." 1). I assume you can cite no research supporting the idea that new programmers are better off with your recommendations? 2). Your idea doesn't seem to take into account that different people think in different ways. I believe this approach was good for you. But as far as we know you could b…

Are you genuinely attempting to argue that thinking ahead and fully understanding the problem isn't preferable to tweaking one's way to a solution?

Those were not my words. I said to discourage all students from using IDEs and debuggers doesn't make sense.

I went quite a while with no tools other than a hex editor to type in op codes. I don't think it did anything except hurt productivity.

Maybe you learn or work better that way. I don't. And I don't see how you justify assuming all new programmers would.

Re: Software Development at 1 Hz

#73
post #55

Earlier quoted context omitted.

Sure, but my point is that being forced to be more methodical isn't a good thing. Not needing to be methodical is better (because your tools will catch your mistakes for you).

This is... What? I'm not all in on what I call "Poirot's doctrines," but there is almost always room for method. I grant that some methods aren't needed and speed is always of high value. However, speed of bouncing from beep to beep in your tools are not always faster than stepping back and thinking. As an example, no amount of fast feedback will help you complete all of the Euler problems.

> no amount of fast feedback will help you complete all of the Euler problems

I find this one almost a perfect counterexample. The Euler problems are almost ideally suited to high levels of interactivity, in order to tease out patterns and solutions.

By no means am I a massive Euler user, but when I was solving #555 I was sure glad to be using Python. If I had a >1m recompile time I probably would have just given up.

Re: Software Development at 1 Hz

#74

Earlier quoted context omitted.

If 8 minutes sounds like a lot... turnaround times when you work with FPGA code can be hours (and months if you're taping out an ASIC). After having to cope with that for a while, I've found that even with software I think a lot more before writing any code, and now I find myself stepping into the debugger much less often. (My point is: debugging first in your head is yet another skill that should really be taught to…

> debugging first in your head is yet another skill that should really be taught to everybody but isn't Along with smelting iron. I don't know why people advocate skills one doesn't need, saying "but they make you better". Skills you don't need will atrophy, because you don't need them. Conversely, skills you need with strengthen. Why would I debug first in my inaccurate head when I have a perfectly accurate debugger…

This is as silly as asking why people advocate exercise. I mean, you clearly don't need to be able to lift heavy things. Even if it is sometimes helpful.

Similarly, thinking about things before you do them will almost always be something you could just skip out on. But... It can be very helpful. And exercise is a great way to get better at work. "Practise makes perfect" and all.

Re: Software Development at 1 Hz

#75

Earlier quoted context omitted.

>>"I quite strongly discourage teaching programming by starting with IDEs..." >>"...also happens if you give them a debugger..." 1). I assume you can cite no research supporting the idea that new programmers are better off with your recommendations? 2). Your idea doesn't seem to take into account that different people think in different ways. I believe this approach was good for you. But as far as we know you could b…

Are you genuinely attempting to argue that thinking ahead and fully understanding the problem isn't preferable to tweaking one's way to a solution?

"Thinking ahead" is often a great excuse to design an overengineered mess of a solution that can't be tweaked and doesn't really properly solve the problem either. To be pithy - see Java.

Sometimes, exploring the problem space can give you a fuller understanding of a problem faster by forcing you to confront pitfalls that may not be obvious until you try a solution. We use all kinds of wonderful terms for this - "Agile", "Prototyping", etc.

Both extremes - fetishizing planning and up front design, or fetishizing short term iteration and poking things without deeper thought - have their problems, and occur too often. Neither tool is a panacea, but both have their place.

Re: Software Development at 1 Hz

#76
post #73
post #55

Earlier quoted context omitted.

This is... What? I'm not all in on what I call "Poirot's doctrines," but there is almost always room for method. I grant that some methods aren't needed and speed is always of high value. However, speed of bouncing from beep to beep in your tools are not always faster than stepping back and thinking. As an example, no amount of fast feedback will help you complete all of the Euler problems.

> no amount of fast feedback will help you complete all of the Euler problems I find this one almost a perfect counterexample. The Euler problems are almost ideally suited to high levels of interactivity, in order to tease out patterns and solutions. By no means am I a massive Euler user, but when I was solving #555 I was sure glad to be using Python. If I had a >1m recompile time I probably would have just given up.

I contend that if you have solved 500 ish of those problems, you are a bit beyond the majority of programmers.

Also... I don't see how any single Euler problem could have minute plus compiles. No matter the language. :(

Re: Software Development at 1 Hz

#77

I wrote numerical code for a while, it simulated a magnetic material. It would take hours to run a simulation long enough to be able to verify that it was correct. Make a change, wait five hours, check if the change worked. I eventually started keeping a journal of every code change I made, along with the hash of the binary that it created. I could use this to make several independent changes and run them all at the…

Being methodical is good when your problem is intricate and well defined. Fast feedback won't be helpful in implementing a complex algorithm like a compiler or a numerical simulation (although I would argue it will help you debug it).

When what you're doing is simple but error prone, or not well defined fast feedback can make you much more efficient. If you're using an underdocumented API/dataset, the best way to understand it is to probe it with code, quickly iterating.

I used to write a lot of LaTeX and make lots of simple mistakes (missing backslashes typically). I found having an environment where I found my mistakes as soon as I made them more efficient than searching through the output for all mistakes, and then for each mistake finding the corresponding source and correcting them.

Re: Software Development at 1 Hz

#78
post #76
post #73

Earlier quoted context omitted.

> no amount of fast feedback will help you complete all of the Euler problems I find this one almost a perfect counterexample. The Euler problems are almost ideally suited to high levels of interactivity, in order to tease out patterns and solutions. By no means am I a massive Euler user, but when I was solving #555 I was sure glad to be using Python. If I had a >1m recompile time I probably would have just given up.

I contend that if you have solved 500 ish of those problems, you are a bit beyond the majority of programmers. Also... I don't see how any single Euler problem could have minute plus compiles. No matter the language. :(

I haven't solved 555 problems, just problem #555 [1]. Sorry if I was unclear.

I also wasn't saying that any language would get long compile times on Euler questions -- they're far too short for that -- but that theoretically if they did it would cause problems.

[1]: https://projecteuler.net/problem=555

Re: Software Development at 1 Hz

#79

I wrote numerical code for a while, it simulated a magnetic material. It would take hours to run a simulation long enough to be able to verify that it was correct. Make a change, wait five hours, check if the change worked. I eventually started keeping a journal of every code change I made, along with the hash of the binary that it created. I could use this to make several independent changes and run them all at the…

I'm in a similar situation -- I write a lot of long-running hadoop jobs where I won't know the results for an hour or more. I try to "think twice, run once".

When I'm debugging, I'll kick off several variants to test different ideas, and write myself notes on what I expect to learn from each one when it finishes. Then I can go off and work on something else until it's done, and use the notes to get myself back into the debugging groove. Without the notes, I'd find myself an hour later struggling to remember why I even ran a particular variant.

Re: Software Development at 1 Hz

#80

> At the same time I cannot use toy languages that have no compile time type checking This guy seems like and sounds like a serious developer, so I'm totally confused by this statement. Dynamic languages that don't do compile time type checking are not toys. I used to only write in Java or C++, but I think it's a stage of maturity as a developer to realize that you can develop code that can take arguments with the as…

> But, for a lot of if not most of practical web development, you can use dynamic typing, and most children do not need that level of micromanagement.

I use TypeScript because that level of "micromanagement" saves me more time in avoiding bugs than I spend adding static annotation. Hell, the improved intellisense alone means I no longer need to read docs in a lot of cases, meaning writing code is faster for me too - even ignoring bug rates. (Of course, it's sometimes prudent to check the docs for things like edge cases regardless.)

In C++-land, I've started using e.g. clang's threading annotations to good effect in catching some of the most heinous bugs to debug - incorrect multithreaded code that forgets to do simple things like lock mutexes meant to protect data structures.

I've dabbled in a toy project in Rust-land. The ability to catch and prevent data races is fascinating, and the ability to stem the tide of null dereferences at runtime seems pretty handy. Have you never had a hell-to-reproduce null deref that only occurs in your release builds? It's pretty bad when it ships to a large number of customers.

I see SQL injection vulnerabilities, and wish APIs properly segregated SQL Data from SQL Commands - two entirely different types of things entirely.

And yet for awhile I was a lot more forgiving of dynamically typed languages. Until I was able to compare JavaScript vs TypeScript - which I'd argue started as basically JavaScript with static typing tacked on as, effectively, an afterthought.

> If you argue that you need types because otherwise you can't be safe, I'm sorry, but that's like being a helicopter-parent.

If helicopter parents were as beneficial as static typing, I'd have a lot less against them.

Post reply on HN