Better HN
topnewbestaskshowjobs
Log inSign up

hellofunk

9,428 karma · joined Jul 10, 2015 (11y ago) · 3,276 submissions

John Bellick, Mexico City
Submissions

comment 10y ago · link · parent

There are a few new dark corners in modern c++ ... Enough to inspire Scott Meyers to fill a new book of advice just for the new idioms. C++ is powerful but complex no matter how you look at it.

comment 10y ago · link · parent

You always compile your function, var, or file before seeing changes in Clojure. But, compilation is usually quite fast since you are linking against precompiled binaries in your dependencies, unlike, for example, header-only sources.

But to say you never compile anything in Clojure is wrong.

comment 10y ago · link · parent

Put those puppies up on github for the rest of us to enjoy! or, if not, can you recommend some good repos that showcase great C snippets that help in a lot of situations?

comment 10y ago · link · parent

The original creator of the C++ STL has said in interviews that after a long career of C++ development, he still never uses -- and sees no use for -- any model of inheritance for anything. I've since learned that my own C++ code is much better when I very sparingly, or never, subclass anything. This has the added benefit of also never using vtables.

comment 10y ago · link · parent

Considering that vector, map, etc are widely used and expected features of software development, I would think that good libraries in C exist for these already, so you don't have to even write your own 100 lines. Are there any?

comment 10y ago · link · parent

I assume you'd be using techniques discussed here?

http://stackoverflow.com/questions/384121/creating-a-module-...

comment 10y ago · link · parent

I can't agree with this, though I do have respect for Qt. But, having to put magic macros inside all your subclasses doesn't really make things simpler... and, Qt's own libraries for doing many of the things that the STL does are mostly of the same complexity as the analogous tools in the STL.

comment 10y ago · link · parent

I really like this idea of using C as a main language, but when you mention writing your own vector and hash map implementations (and undoubtedly many other fundamental tools that are otherwise provided for you by STL), doesn't that get quite time-consuming to re-invent the wheel in those areas that it's great to have a wheel already there for you?

comment 10y ago · link · parent

Still better to not look at a computer at all frequently, and focus on something in the distance.

comment 10y ago · link · parent

It's not as trivial as you would think. I'm reading through the long discussions from the Bullet developers, and clearly it's not just a short project.

comment 10y ago · link · parent

Since game development often requires interfacing with robust C++ libraries in graphics or physics (i.e. Bullet), I'm curious how you do that... are you either not using physics or writing your own basics physics engine? Or, are you writing parts of your app in c++ just to wrap the interface in a way you can do the rest of the work in C?

comment 10y ago · link · parent

I've seen Justin Frankel write that he works this way, and it has most certainly served him very very well.

comment 10y ago · link · parent

>Recompiling and reloading parts of your game at run-time is quite easy in C.

This is cool to hear. I've never done anything like this, but it almost sounds like REPL-driven development is a possibility in C?

comment 10y ago · link · parent

>Even more than that I care about the speed of the compiler. I am not a zen master of focus, and waiting 10+ seconds is wasteful, yes, but more importantly it breaks my flow. I flick over to Twitter and suddenly 5+ minutes are gone.

Quick suggestion, has really helped me: take that 10 or 20 seconds waiting for compilation, and stare out a window. This gives your eyes much needed break from focusing on a computer monitor, allows the muscles to refocus and breathe, and doing this regularly during a coding session can have important long-term benefits for your vision.

comment 10y ago · link · parent

Perusing over any random comment section to an HN post reveals that the vast majority of comments are made to dissent with another comment. Not all of them, certainly, but definitely a majority. That appears to be the debate culture at work, in my opinion.

But I understand your point about "meta" comments for HN. I think the occasional meta thought helps to add some perspective.

comment 10y ago · link · parent

I certainly don't know Rust as well as C++. Some other fellows in this thread provided some features in C++ that you can't learn about in Rust, fyi.

comment 10y ago · link · parent

Interesting point. I was curious about this, and turned to Wikipedia:

>In 2006 and 2012, Computerworld surveys found that over 60% of organizations used COBOL (more than C++ and Visual Basic .NET) and that for half of those, COBOL was used for the majority of their internal software. 36% of managers said they planned to migrate from COBOL, and 25% said they would like to if it was cheaper. Instead, some businesses have migrated their systems from expensive mainframes to cheaper, more modern systems, while maintaining their COBOL programs.

comment 10y ago · link · parent

I read a report years ago that said in the U.S. the level of "happiness" increases with your income only up until an average of $60K per year, and after that, increased income had no more effect on happiness.

2899.

Ask HN: Is Hacker News basically a debate club?

2 points · by jb1991 · 10y ago · 2 comments

comment 10y ago · link · parent

I think you are missing the point. It is widely understood in the C++ world that no one needs to know "all language features" and in reality, almost no one does. It's not a language where that is necessary or expected because the language is large and has a tremendous range of uses, and no one needs all of it for a particular project or focus.

But you can most certainly learn all the basics of writing good C++ code, and interop with great C++ libraries and get real stuff done, in fairly short time. It took me about a month to go from Objective-C to C++ and start publishing iOS apps written almost entirely in C++. And if you don't need that, you can start writing command-line utilities in a few days at most.

comment 10y ago · link · parent

Exactly, C++ has been around for a very long time, so much runs on it, depends on it, and it is not going anywhere any time in our lifetimes, I'm certain of that. That makes it a very valuable skill. You can always study the newer languages when interested in them (I find them all fascinating), but for a deep leg into the way the industry works at its core, I think knowing C++ gets you very far. Google touts Go a lot, but so much of Google's tools are actually C++ at heart (protobufs and Chrome for example), and Apple touts Swift and has its own frameworks in Objective-C and now Swift, but under the hood, so much of their toolkits and the language of Swift itself are implemented in C++; nearly all cross-platform games we know and love for a wide variety of devices and OS are C++ -- my point is that it is a crucial language and it does not hurt to understand it.

comment 10y ago · link · parent

I think that Rust simplifies some things that you must do yourself in C++, and learning how to do them is valuable. At the very least, it will help you appreciate other languages, but it can also show you areas where you get manual control over performance in ways no other language offers.

And, perhaps most significantly, there are a wealth of C++ libraries out there that have no equivalent in other languages, and being able to use them is an education in itself.

comment 10y ago · link · parent

Sorry but this is just wrong. You do not need several years to get productive in C++. Very few professional C++ developers are using every feature of the language. You could spend a year mastering template metaprogramming alone, but do you need it? Not most of the time. Interfacing with good C++ libs (another reason to learn C++) does not require metaprogramming, and many other features fall into a the same category. Saying there are 150,000 required learning points is sensationalism and just downright false.

comment 10y ago · link · parent

>It's not going to be a particularly interesting thread if everyone who works in a language that trends higher than Go on Google chimes in to say "you should learn my language instead, because it's more popular".

I think C++ is unique in that it is really not as popular as many new languages, not as trendy and as much in the news, and not even taught as much in college programs, yet, it remains the language where so many jobs are. This gives anyone with the desire to learn it a good and marketable skill that can make it possibly easier to find work and continue making a living doing software development. That does not apply to Rust, so I think it's a fair point to make to anyone who is asking about what languages are good to learn.

As for whether C++ has any techniques to teach that Rust does not, C++ is definitely a unique experience to go through and certainly gives a developer more insight into the actual machine they are working on in a way that few languages do.

comment 10y ago · link · parent

I disagree. As others have pointed out, the demand for C++ jobs is still much higher than Rust jobs, so I think my answer still stands as a way to set yourself apart when thinking of a new language to spend a few months on.

Ideally, one would learn Rust and C++ both and see how they differ, and why.

comment 10y ago · link · parent

I actually think you'd go far to spend 3 - 4 months learning C++. Almost every language you can likely encounter in your career will use some feature that will get introduced to you in C++, especially modern C++, and, almost any language will be easier to learn and use after first going through a C++ learning curve.

Besides, C++ is still the big player, more than all others. Even Apple's new language Swift is written in C++. It's a good language to know something about.

It also sets you into a different category of programmers, from what I have found recently, since C++ techniques are not taught much in college programs any more (based on my conversations with recent CS grads), which really surprises me. It's a special skill that would set you apart if you know it.

comment 10y ago · link · parent

You are confusing the experience of the audience with the creative process of the artist.

comment 10y ago · link · parent

The definition of "privacy" very much differs significantly among different generations and cultures. Compare the Dutch to the Americans, or anyone over 35 with anyone in their teens or early 20s. There is a smaller overlap in what they all consider "private" than you'd at first think.

comment 10y ago · link · parent

Is it really an issue of image quality? Because while the qualities are different, analog media has its own character. You have to do quite a bit of image manipulation in digital to get that "super 8" look, and it isn't always that convincing. Same with black/white photography vs. digital -- the way a digital chip reacts to light is very different than the way chemicals in film react, and some film stocks have a range and tone that is very hard to emulate with digital images. I don't think it is a question of which is "better" but rather that aesthetic that an individual wants. You have to learn lighting techniques in a new way when you switch from celluloid to digital, and a good DP's intimate understanding of how a particular film stock will respond in the shadows and highlights no longer applies when dealing with a very different medium.

comment 10y ago · link · parent

Yes, a colon nearly always means "said this..." in journalism headlines.
1
969798
110