TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What's the most simple thing you struggle to understand in programming?

41 pointsby betimdalmost 8 years ago
Always there's something you struggle to understand and you're surprised w/ yourself

23 comments

mcrideralmost 8 years ago
Testing. I'm a very experienced programmer, and I have written plenty of unit tests -- but I've never worked in a place with a good testing culture and I've always struggled to develop a high level mentality of how and why I should be testing my software. When should I write a test for something and what is the best way to go about it? Does my code have to be more 'test friendly'? TDD seems very appealing to me as a way to outline my software before I 'dive in' but its hard for me to rationalize spending the extra time on building out the testing framework.
评论 #14518931 未加载
评论 #14519837 未加载
评论 #14520063 未加载
评论 #14519187 未加载
Schwolopalmost 8 years ago
Every asynchronous programming API ever created.<p>My program spawns and runs in the main thread. It calls the main function. If it want it to run forever, I&#x27;ll stick a while(1) loop in that function.<p>Now I want to have a particular thing go off and do some work in parallel with that main loop, and when it&#x27;s done, I want the next iteration of the main loop to pick up on that fact.<p>Not once have I encountered a sane API for that use-case as easily expressed as those sentences of prose above.
评论 #14518645 未加载
评论 #14518615 未加载
评论 #14519118 未加载
isuckatcodingalmost 8 years ago
I have a few (mostly silly ones):<p>• Async&#x2F;await in C# (I have a pretty good mental model and use it quite often but honestly have never truly understood how it compares to c&#x2F;C++ threads)<p>• async concepts in Java Android. Runnable, future, asynctask, threads arrghhhh. My head hurts.<p>• multitable SQL joins (inner vs outer). Someone gave a pretty good explanation in the comments.<p>• why do I need to use nginx for my web server? And what is a reverse proxy anyways?<p>• how come I can use any smpt client or something like mailchimp or sendgrid to send an email and specify any email in the &quot;from&quot; field. Can&#x27;t I pose as someone I&#x27;m not?
评论 #14519471 未加载
zumualmost 8 years ago
Basic OOP. What do I make a class?<p>Functional programming in general clicks with me, however.
评论 #14519379 未加载
评论 #14518962 未加载
rrggrralmost 8 years ago
Lambdas. Monads. Inner &amp; outer joins. Tensorflow.
评论 #14518901 未加载
评论 #14518767 未加载
评论 #14518769 未加载
评论 #14518870 未加载
caseymarquisalmost 8 years ago
Lisp continuations! From the name I swear they&#x27;re just backing up the current scoped state and returning to it, but I&#x27;ve yet to find an example that clearly shows what&#x27;s going on in what order. To be fair I haven&#x27;t actually used lisp, just read through the beginnings of the scheme spec.
评论 #14519820 未加载
vacrialmost 8 years ago
More &#x27;ops&#x27; than &#x27;programming&#x27;, but: Email.<p>Email is a real &#x27;devil in the details&#x27; thing. Anyone can follow a web how-to (when they&#x27;re not stale) and set up a basic server, but it&#x27;s crazy complex to understand properly. It&#x27;s also weirdly both old-as-rocks and at the same time constantly changing (eg: deliverability scores, major vendors changing how they accept things, etc). Aliasing and mail flow and MUAs vs MTAs and mailbox formats and multiple arcane config files and blacklisting and DKIM and MX records (and TXT records) and etc etc etc... and if you&#x27;re really crazy, GPG-signing. I&#x27;ve always got enough to just scrape by, but never actually comfortably grokked it all at any point. So many disparate spinning plates...
cmehdyalmost 8 years ago
I&#x27;ll risk looking like an idiot: Figuring out the architecture and different combinations of languages in modern web dev, and what a good solution choice is for a given need&#x2F;problem.<p>From the basic options to set up a server, code deployment and maintenance using Github, nodejs and similar JS-everything, XML&#x2F;JSON, how much of what should CSS take care of, DB access (and which one), structure of a modern webpage, CDNs, structure scaling, and requirements for browsers and platforms..<p>I used to use JS to change some text in html pages ftp&#x27;d to a server running a basic apache. Looking at it now is a big slap in the face. Nodeschool helps a bit, but it&#x27;s all pretty blurred still. The more I dig, the deeper it gets without a sense of direction.
评论 #14519786 未加载
stefanpiealmost 8 years ago
I just figured this out today but the pass by reference and pass by value thing in Python. I understood that Python variables in the same scope can refer to the same memory object, just the name is different. However when you pass the into classes and fuctions, mutable types are pass by reference and imutable types are pass by value. I just came to this realization after spending hours looking at gui code trying to figure out why some variables form a parent object we&#x27;re not changing when passed into another class and modified.
评论 #14519122 未加载
jtolmaralmost 8 years ago
C++ pointer&#x2F;reference syntax.<p>I understand the concepts, and pointers make perfect sense to me when I&#x27;m programming in assembly, but whenever I look at them in C++ it&#x27;s like &amp; and * mean the opposite things when used in variable declarations from what they mean when used as an operator and yet another thing when used to declare arguments. But I&#x27;ve never seen anyone else acknowledge that they&#x27;re weird so I feel like there&#x27;s some sort of logical connection I&#x27;m missing.
评论 #14519872 未加载
homosaphienalmost 8 years ago
This probably is ignorant, But I don&#x27;t get why we need interface in java&#x2F;c#. Why can&#x27;t a base class with abstract methods be sufficient for that use case?
评论 #14518680 未加载
评论 #14519069 未加载
评论 #14518574 未加载
评论 #14518611 未加载
anothathrowawayalmost 8 years ago
Where to start, and what to make.
评论 #14519135 未加载
genkimindalmost 8 years ago
Dependency injection.
评论 #14522598 未加载
jdmoreiraalmost 8 years ago
Clean code.<p>What makes some code better than other code? The understanding of this is probably a lifelong pursuit.
RUG3Yalmost 8 years ago
I guess this isn&#x27;t &quot;simple&quot; but I&#x27;m in a place now where I&#x27;m responsible for &quot;all-the-things&quot; and I&#x27;m having a difficult time understanding what makes a good architecture for a web app.
FLGMwtalmost 8 years ago
Right now, Reactive Streams and RxJS in particular, especially around errors.
somethingsimplealmost 8 years ago
call&#x2F;cc. I understand what it is and what it does, but I don&#x27;t understand how it&#x27;s actually used in a practical way (all I&#x27;ve ever seen are synthetic&#x2F;too abstract examples).
评论 #14519841 未加载
samblralmost 8 years ago
Initial setup to get started with programming and run a hello world kind of thing.<p>With things we do outside of an IDE.<p>Language specific functions and behaviour.
imwallyalmost 8 years ago
How to overcome imposter syndrome.
drdeadringeralmost 8 years ago
Abstraction.
mhh__almost 8 years ago
Why C++ doesn&#x27;t have modules yet ;)
thdnalmost 8 years ago
Pointers
评论 #14519293 未加载
评论 #14519248 未加载
aphextronalmost 8 years ago
Haskell.