NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
▲Competitive Programmer's Handbook (2018) [pdf] (cses.fi)
lifeisloving 24 hours ago [-]
Ive been doing codeforces, Rosalind, codewars and leetcode casually in my spare time to detox from heavy daily agent use.

Ive been relearning a ton that either over-reliance on llms caused me to forget, or just lost due to time.

Its been extremely fun. I really missed the feeling of thinking really hard and arriving at a solution.

I hope we dont lose this desire as a species.

yuye 21 hours ago [-]
>I hope we dont lose this desire as a species.

I really think the rise of LLMs has demonstrated quite well that most people don't care. Only a minority of us have ever had this desire.

hajile 12 hours ago [-]
Learning to program at an early age because you enjoy it has always been the differentiator.

Even if that child doesn’t have as much raw talent, the desire itself (paired with extra years of experience —- especially when the brain is at its most malleable) will drive success in a way the pursuit of money alone never can.

jvanderbot 4 hours ago [-]
Guns vs Martial Arts. There are absolutely benefits to doing martial arts that are not self defense, but when you have to defend yourself in a pinch a gun is pretty helpful.
dominotw 2 hours ago [-]
guns are not suitable for every situation though. that dialog from the irishman 'guns you charge , knife you runaway'
vikas-sharma 47 minutes ago [-]
in what situation is a knife better than a gun apart from cutting veggies and fruits?
Leif24 26 minutes ago [-]
Idk of the details of that quote, but it does spring to mind that a gun is far better at range than a knife. So, closing that distance could be better than fleeing if your opponent has a gun and there is no cover for you to use while you escape (depending on the weapon and the wielder! I'd take my odds running away from, say, an amateur armed with a flintlock pistol... If it is a trained marksman with a rifle you'd be dead trying to run, whereas, if you are close, trying to close the distance and get control of the gun might - might - work). Increasing the distance between you and a person with a knife is always a smart move.
jvanderbot 42 minutes ago [-]
In the martial artists' minds, of course.
goosejuice 19 hours ago [-]
The rise of a technology that reduces cost in all forms of knowledge work demonstrates a minority of humans have a desire to learn and have hobbies?
randomNumber7 4 hours ago [-]
The majority prefers playing videogames, watching tv and porn.
goosejuice 2 hours ago [-]
That's a bit self-defeating given people pay to be challenged with video games. A souls game is harder than a lot of leetcode for me and it's not free. That said I'm not seeing anyone offering a causal link between the rise of LLMs and the human preference to less effort for the same outcome (with very important exceptions, see effort paradox).
jeffrallen 2 hours ago [-]
I care about delivering results to my colleagues, and so my ideas plus an LLM lets me do what I care about.

You and the author care about software craftsmanship, which is wonderful. But might need to remain a hobby...

locknitpicker 12 hours ago [-]
> I really think the rise of LLMs has demonstrated quite well that most people don't care. Only a minority of us have ever had this desire.

I think people care about the problems they have to handle. Not having to deal with a problem eliminates the incentive of training to fix the problem, because you don't waste time on problems that don't happen.

People also stopped caring about what machine code was generated by compilers. In the past people had to roll out asm to get things to work. Not anymore. With llms it's the same way.

goosejuice 2 hours ago [-]
People also use calculators and gas grills and cars. As you point out, a tendency to desire the same outcome for less effort doesn't imply one, or society, does not care for effort. It's about utility and where that effort is spent.
ebiederm 9 hours ago [-]
I know people who routinely check the generated machine code of compilers to see if it is reasonable or buggy.

When it is bad they either rewrite their source code or write assembly.

A tool do a job good enough that people don't have to do the job by hand does not mean people stop caring about the quality of the job.

ofjcihen 9 hours ago [-]
It’s kind of like how in early aughts everyone was telling their kids to become nurses and now we have a surplus of nurses with absolutely zero bedside manner.
donkey-hotei 7 hours ago [-]
serbuvlad 12 hours ago [-]
If you look in history this is perfectly normal.

Nothing new under the sun.

lifeisloving 10 hours ago [-]
Idk, basically anyone who speaks candidly about this to me says their use of LLMs over the last year has stunted them in some way.

LLMs aren't comparable to anything thats come before, in my opinion. We had much more time to adapt and integrate with original forms of computing, as well as many other technologies from centuries past.

Sure you can use llms responsible and perhaps in a rewarding way (that isnt just related to making money), but very very few people are making that effort or even know how to.

Its more likely people use them irresponsibly like we do cars. Walk half a mile... nah I'll drive. Now we have endemic diabetes.

serbuvlad 8 hours ago [-]
Obesity is trending back down and will continue to do so.

Machines have removed our need to work, this stunts our body, and the solution is synthetic work (gym).

AI removes our need to work with our minds (at least partly), this stunts our mind, and the solution is synthetic mind-work.

Sure it will take some time to get used to. But we will get used to it.

johnnyanmac 2 hours ago [-]
>Obesity is trending back down

It's trending down because researchers found a magic pill (well, peptide) that was clinically proven enough to become over-the counter. This trending down started in 2023. 40 years of policy barely did anything (partially because it never fixed the systems, but I digress).

So are we just going to pray in 40 years someone finds a solution to brainrot?

Smeevy 6 hours ago [-]
[dead]
delis-thumbs-7e 14 hours ago [-]
Antti is a wonderful teacher, he is one of my lecturers. His courses are pretty hard, since they go into very very bread and bones of CS (algorithms, memory allocation, etc), but I always feel I 10x’d my understanding after them.

Seems he has a new book out (I haven’t read it): https://link.springer.com/book/10.1007/978-3-032-07453-9

ExciteByte 23 hours ago [-]
There is a more polished version of this book:

https://link.springer.com/book/10.1007/978-3-031-61794-2

Additionally, there is a nice set of problems that go along with the book:

https://cses.fi/problemset/

dang 1 days ago [-]
Related. Others?

Competitive Programmer's Handbook (2017) [pdf] - https://news.ycombinator.com/item?id=17605395 - July 2018 (14 comments)

Competitive Programmer's Handbook (2017) [pdf] - https://news.ycombinator.com/item?id=16952222 - April 2018 (121 comments)

A Competitive Programmer's Handbook - https://news.ycombinator.com/item?id=14115826 - April 2017 (157 comments)

Competitive programmers handbook - https://news.ycombinator.com/item?id=13762408 - March 2017 (2 comments)

1vuio0pswjnm7 5 hours ago [-]
1739758443 | Competitive Programmer's Handbook [pdf] | https://cses.fi/book/book.pdf | https://news.ycombinator.com/item?id=43074212 | 0 comments

1739802959 | Competitive Programmer's Handbook [pdf] | https://cses.fi/book/book.pdf | https://news.ycombinator.com/item?id=43079410 | 0 comments

1749209436 | Competitive Coder's Handbook [pdf] | https://cses.fi/book/book.pdf | https://news.ycombinator.com/item?id=44199775 | 0 comments

xendo 1 days ago [-]
This one is quite difficult, it sacrifices some readability for cleverness and conciseness. I find Algorithmic Thinking by Zingaro much more approachable but almost as dense.
gwbas1c 1 days ago [-]
I think if you always follow the same abbreviations, they'll be readable to you.

Remember, these are throwaway programs; not something that you need to worry about someone else maintaining, or something you need to worry about opening up 5 years later.

yuye 21 hours ago [-]
I've been a judge at a few ICPC contests. We always double-checked first solves for any of the problems by hand.

The coding style demonstrated here is extremely common with high-level competitive teams.

perganomoly 7 hours ago [-]
This is a great share. Thanks!

I’ve been looking for some coding puzzles to make my head hurt a bit. Somehow I can’t get into Leetcode and problems from the interview prep sites. Maybe this tome will land a bit better since it has an aim other than getting a job where you probably won’t use the stuff anyway.

Thanks again.

ricardobayes 10 hours ago [-]
This is a great book, not just for competitive programmers. It compiles a few gotchas that apply in general programming, regardless the language.
Keegs 1 days ago [-]
I’m a big fan of this book. It’s an equally great algorithms reference and way to prep for coding interviews. I haven’t had one in a while but doubt they’ve changed too much in the last half decade.
BeetleB 1 days ago [-]
I read this book to prepare for coding interviews. In retrospect, it really didn't help with that goal.

I did, nevertheless, learn quite a bit from it. Would recommend to everyone. It's well written.

brcmthrowaway 20 hours ago [-]
What actually helped?
BeetleB 4 hours ago [-]
Just lots of practice.

I guess what I meant is that if you've read stuff like Cracking The Coding Interview and taken an undergrad algorithms/data structure course - that's sufficient knowledge for Leetcode style problem.

The additional stuff in TCPH was fun to read/learn, but I never used it to solve any of those problems.

A note: In my last round of interviewing, I read Beyond Cracking the Coding Interview (the sequel), and the tips it gives for technical coding problems were great - much better than the original book. I can't say it helped getting a job, because the job I did get had its interview just before I read that book.

brcmthrowaway 2 hours ago [-]
Did you actually read back to front or cherry pick?

Also, how did you coordinate practice and having a day-job?

efavdb 5 hours ago [-]
I see this author has a published book as well "Guide to Competitive Programming" - curious if it's the same text?
HEX4AGON 14 hours ago [-]
I used this book back in 2nd year of uni to prep for interviews. I did electrical engineering and so I didn't have a strong background on CS and primarily used this book to get over the software engineering interviews. Helped me got my internship (and probably my job now lol). Another book that I used was the OSTEP for OS and another book about networking that I don't remember. Also Harris & Harris DDCA for computer architecture & Digital Design.
sashank_1509 22 hours ago [-]
In the past this book was interesting since getting good at it did somewhat help you become a better programmer. At the very least, your typing and ability to write a first implementation with fewer bugs improved as you practiced competitive programming, to some extent even your ability to problem solve and come up with good architectures improved.

That’s all out of the window now. If we are really in “do we even read the code?” territory, then this is just a hobby to do for fun, and doesn’t matter for any real world work. But even if we read the code, but most code is written by prompting and iterating with agents, I don’t know if this will be helpful at all.

0xpgm 17 hours ago [-]
People tend to underestimate to what extent pre-LLM programming experience contributes to their ability to steer LLMs in the right direction and produce decent results.

In 5 to 10 years, we'll see what kind of engineer is produced from pure LLM steering without years of hand coding experience. Even many of the more experienced ones would have some of this skill atrophied.

jmfldn 16 hours ago [-]
I see this sort of thing as a mind gym, and staying sharp will help your critical faculties as a programmer. Of course, the specific problems are nothing like the problems most of us solve day to day, but it still has many benefits.

Let's take a hypothetical where we really do all stop reading or writing code, because the models and tooling get good enough. In that scenario I would still argue for this of thing. Studying algorithms gives you a lot of insight and a powerful way of thinking. This class of problems is ultimately about how aspects of software work, so having some familiarity with famous algorithms is part of computer literacy. I'm not saying that you need to be an expert, but struggling to solve a few hard algorithm problems teaches a lot.

reasonableklout 16 hours ago [-]
As a totally mundane way of looking at this, I treated leetcode the same way for years, where I'd do it for fun and because there was a strange satisfaction in solving some of the harder problems, even though it very rarely had relevance in my SWE day job. Except for very rare occasions where I had to write simple graph algorithms.
tudorconstantin 21 hours ago [-]
In the past few months, all of the technical interviews I had involved some form of live coding exercises. Some with hard leetcode level problems even though the positions I interview for are backend/fullstack web engineering, not some kind of high performance algorithms enhancements and implementation jobs (like HFT trading or low level libraries). I encountered this so often nowadays that I am now allocating a few hours per week for algo problem solving to keep my coding skills polished because the AI is writing my code in my day to day job also
payanai 6 hours ago [-]
Very nice ! Thanks for sharing this. Fun to play around with algorithms during college days !
oleggromov 14 hours ago [-]
I'm not a competitive programmer and won't be one, but this book seems to be a very practical, hands-on intro into many useful algorithms. Really good!
dominotw 1 days ago [-]
is leetcode still a thing in interviews. I personally want it to be. We need to start gatekeeping this profession hard ( this is a hard 180 from my stance for last 2 decades). Also regret contributing and being pro opensource.

Closedsource, credentialism and gatekeeping is my new stance.

moronicles 1 days ago [-]
Who exactly is it that will be doing the gatekeeping? I have a hard time imagining companies caring much about competitive coding scores, and I’ve certainly never heard of layoffs being decided based on LeetCode performance.
dominotw 23 hours ago [-]
> layoffs being decided based on LeetCode performance.

thats not what gatekeeping is

1 days ago [-]
shahbaby 23 hours ago [-]
I'm not sure if I agree with this but I find the downvotes at even the suggestion of some mechanisim to protect employment sad.

No other profession is as eager to make themselves obsolete as those who build software.

Maybe they think the world runs on meritocracy. Anyway looks like now they are seeing what happens when there are no gates at all and anyone can do what you do.

bitwize 1 days ago [-]
Closed source will do squat unless you protect your binaries with some sort of secure enclave encryption scheme. AI can reverse engineer your binaries and deliver a copyright-laundered version in hours or days.
randomNumber7 4 hours ago [-]
You give the user access to the software over a web interface. He has never access to the binaries because they are on your servers.
jbs789 1 days ago [-]
Two decades learning from others, then close the gate. Can’t ding you for inconsistency though. Your contribution to this discussion is consistent with your new ethos. Good luck with your new approach to the world.
JSR_FDED 20 hours ago [-]
I took his comment to mean that programming jobs should be kept for people who genuinely care about developing a deep understanding and a willingness to learn, instead of those just typing prompts and not really caring beyond that.
hex4def6 19 hours ago [-]
That's the charitable way of interpreting it. The less charitable way is that they're bitter that open-source has basically been used to train their replacement, and that they want to turn programming into effectively a guild-based profession to protect the jobs of those presently in the industry. Similar to the button-making guilds of the past, for instance.
bluefirebrand 2 hours ago [-]
> That's the charitable way of interpreting it

It's a good thing that "interpret people's comments charitably" is one of the top guidelines on this forum then

dominotw 9 hours ago [-]
Well there is something between 'button making guilds' and 'go to bootcamp for 2 months to be a software engineer'

Every other profession does gatekeeping. Yet we dont see any animosity towards them for doing so. Infact we condone it.

kbelder 2 hours ago [-]
I have animosity for most of them!
buriram 16 hours ago [-]
Pulling up the ladder is very common among any kind of society, profession and immigration policies. And people advocate for it all the time.
dyzone 19 hours ago [-]
You need to explain why.
mellosouls 1 days ago [-]
We can call it Coding Canutism.
naagi 1 days ago [-]
shortsighted and a bit late anyway
simianwords 1 days ago [-]
is this an excellent LARP bait or someone with these sincere views?
pbkompasz 1 days ago [-]
Why not both?
robotpepi 1 days ago [-]
what?
lencastre 1 days ago [-]
is your favourite colour?
a_e_k 19 hours ago [-]
Blue. No, yel--
Johnyjohnson123 1 days ago [-]
Yellow, yours ?
blobcode 24 hours ago [-]
Wrong!
AspireOne 22 hours ago [-]
Is not a color.
noisy_boy 20 hours ago [-]
Is there a similar book but in Java or Python?
v3ss0n 19 hours ago [-]
Yeah , just let LLM rewrite it for you.
0x20cowboy 18 hours ago [-]
Competitive Programming is such an asinine concept.

It’s like competitive knitting, or competitive architecture.

This focus on the inane is what has really damaged this industries perception in engineering IMO.

Shorel 12 hours ago [-]
Competitive programming is a fun activity with little to no relation with the actual industry.

Why would influence perception in any way being an unrelated very niche hobby?

0x20cowboy 12 hours ago [-]
Incorrect. It is the basis of leetcode interviews.
Shorel 8 hours ago [-]
In that case, I would frame as it is ruining interviews.

The actual day to day of the industry, stays unnafected.

sparkilyshpark 15 hours ago [-]
it is mostly just a math/logic contest, with the benefit that you can get the result on the fly, and maybe cheese some problems without rigourous proof

or you can look at other form of competitive programming, like heuristic contest, that would teach you how to use baseline, run tests, adapt strategies based on given data

no one consider a time limited contest (hours to maybe days) same as engineering job, they do this for the fun of it

0x20cowboy 15 hours ago [-]
Unfortunately you are wrong and this is what led to leetcode style interviews where times puzzles are the gate keeping factor. It has literally ruined the industry.
menaerus 3 hours ago [-]
Leetcode was designed to collectively implement bias towards young talented people whose only obsession at that point of time is their work. So no kids, family, free time, and no financial freedom (mortgages, loans). Once you build such culture, it starts to grow and gatekeep by itself from within.
Shorel 12 hours ago [-]
AI is the only thing that has ruined the industry
TrackerFF 12 hours ago [-]
Nothing wrong with competitive things.

What is concerning, however, is when the competitors of these sports decide that their sport should become a filter for things adjacent to said sport.

The rationale is usually something like: "Competitive programming might not be a robust predictor for job performance, but most competitive programmers I know are also good developers, thus we must use competitive programming as a qualifying factor for hiring new developers." and weight it heavily compared to other signals.

anta40 16 hours ago [-]
I think competitive programming only focus on few technical aspects, like: algorithmic thinking, familiary with various data structures, complexity-performance trade-off, etc etc.

Nothing is wrong with that. Think of it as intellectual exercise. Fair enough, real world software development involves other factors.

mvk666 14 hours ago [-]
more like competitive horse riding. Done for fun, but in everyday life you use a car.
zerr 13 hours ago [-]
Well, there is just horse riding as well, done for fun. I think this is a better analogy.
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 22:31:21 GMT+0000 (Coordinated Universal Time) with Vercel.