4,107 karma · joined Feb 17, 2010 (16y ago) · 1,490 submissions
https://coderescue.com
comment 14y ago · link · parent
As to bytecode...I think it probably does end up more compact than compiled C++, and it seems like it would have properties that would allow it to compress more tightly, but I don't have any numbers on that.
I tend to strip the source and compress and encrypt it; I could convert it to bytecode first, but the last time I tried that it ended up bigger than the compressed text.
>Android C++/NDK by itself counts as a niche? That's kind of surprising! I would have thought a profitable niche would have to be a bit more specialized by now... I guess the NDK hasn't been out all that long.
A lot of "Android" developers are actually Java developers who are trying to cash in on mobile. Serious game developers almost all use the NDK, but serious game developers are in high demand (myself included). So yes, NDK is itself a niche, in that the number of jobs seems to exceed the number of developers available.
On the other hand, by being able to do games in NDK I'm even better off, but just being good at NDK development is pretty powerful. Keep in mind that you also have to deal with Java and the Android stack -- you can't do everything in the NDK. So you need to be someone good at C++ who also can get around in Java.
comment 14y ago · link · parent
To tell the truth, I have a love/hate relationship with C++. Yes, I know it really well at this point. I've learned everything I know because it (at the time) was the only tool reasonable to get the job done. Now I actually avoid using it as much as possible.
The perfect combo for me (in games) is C++ for performant code combined with tight integration with Lua. I hear you on higher-level languages being more productive, which is why most of my game code ends up written in Lua. (I'm far from alone in using this combo -- most major iOS games seem to use the same combo, as do a lot of games in general.)
Why not use one of the three you mentioned? Size and speed both.
LuaJIT is pretty much the fastest dynamic language around, and the overhead of linking into a program is tiny compared to Ruby, Python, or JavaScript. The language itself gives you advanced features like coroutines with upvalues and operator overrides, but at the same time it's super-simple -- to the point where non-programmers can use it to script behaviors.
If you're doing server code you can afford to have things be a bit slower and/or huge (relatively speaking). If you're doing games downloaded OTA on a phone, and you've got a 20Mb limit before they have to use WiFi...well, size is critical (an extra megabyte or two means a lot of assets won't fit any more) and phones are far more processor-bound than most server tasks you'd use a scripting language for. On the other hand, with distributions like OpenResty [1] that hand you an extremely fast server and LuaJIT all bound up together, allowing me to create a cheap server that can handle 3000+ requests per second without barely breaking a sweat...well, since I know Lua ANYWAY, I use it on the server as well.
YMMV. :)
Addressing what you asked: C++ development is in reasonably high demand compared to the number of Fat Guys, so it tends to pay well. Having experience in a niche can also be handy -- by virtue of knowing Android C++/NDK development I've had random people contacting me to ask if I want to work for them, with no real promotion on my part. I don't even want to say what my rate was publicly, though I will say that I expected him to turn me down when I said how much I wanted.
comment 14y ago · link · parent
A well-run insurance company spreads risk among all of its customers. There are NON-PROFIT insurance companies that do an excellent job of spreading that risk around (Kaiser Permanente spends 95% of its insurance dues actually paying for medical care, for example). When you buy insurance you're not EXPECTING to have a problem, but you want to be protected if you do. When someone DOES have a problem, the insurance company hasn't "screwed up" -- the entire point of insurance is to cover unexpected problems.
The only time that the insurance company could be said to have screwed up is if they're losing money overall. And in that case they'll eventually go bankrupt.
>why do people choose to pay them?
Ignorance? Given how many times I've seen advice to never (or at least only rarely) place a market order, I have no idea why anyone does.
Or possibly it's just the "greater fool" theory: They will sell to the HFT if and when they think they know better than you do.
You're claiming that the HFTs are providing insurance to the people who are buying or selling? I find that to be a stretch, since the entire point is that you look for sure bets and attempt to only sell this "insurance" to people who (in your opinion) don't need it.
And frankly most people trading in the stock markets don't know they're even "buying" this insurance. If they did, then yes, I could buy your argument. But they don't. And the ability to choose makes all the difference in this case.
I'd like to hear from someone trading stocks for a mutual fund, and whether they would "choose" to pay an HFT.
The reason that we don't have market makers standing around in pits any more -- that computers can do the trades directly -- also implies to me that we don't need those intermediaries at all. There's a lot of economic leeching that goes on in Wall Street, and I suspect that much of it is obsolete. HFTs are merely another symptom of the same problem.
comment 14y ago · link · parent
I work on libraries more than apps. When I want to hire someone to work with me on libraries, you better believe I'm going to look for a C++ expert. And the explicit keyword is crucial in a lot of cases -- sometimes it can mean the difference between code compiling or not, but even worse is the bug where a parameter is missing and an int is converted to be some class it shouldn't be.
Using existing libraries and just assembling bits into apps? Sure, learning on the job can be OK (though honestly I wouldn't trust C++ written by anyone using it for less than a year full time). Though even then if you don't understand C++ well you're likely to shoot yourself in the foot with the language.
But there are some times that I really, really want someone to know the explicit keyword, at a minimum. Your example of DISALLOW_COPY_AND_ASSIGN is also good to know -- and it's likely in the Google style guide so that people don't have to be experts.
But I'd rather have people know why it's important and how it works than people who are just trusting to the compiler and luck to make everything work right.
I've seen C programmers clear a class that contained a std::string with memset(&foo,0,sizeof(foo)), which happened to work on one implementation but failed badly on another. I've seen people take the raw pointer out of a smart pointer and attempt to manage it themselves -- including trying to wrap ANOTHER smart pointer container around it later. I've seen people fight with a bug for weeks because they didn't bother to initialize all their class members (fixed that bug in about 10 minutes on code I'd never seen before).
The list goes on, and the list of "coding standards" we created to try to enable people who weren't good enough at C++ to work effectively with our C++ library got to be so large that no one could remember it all, rendering it useless. [1]
So yes, if I'm going to have someone work on C++ for me, I either want them to have at least a solid year of real experience, or I'm going to want to code review every line before it gets committed to main. Maybe I'll still hire them, but I've seen so many examples of people misusing C++ (and then having to fix their bugs later) that I've been more than a little burned by it.
Even more esoteric than explicit is the mutable keyword. Major bonus points for anyone I'm interviewing to know what that one means and when it's used. But no major negative if they don't know -- it has very few compelling use cases, after all, so I can imagine people not remembering it.
comment 14y ago · link · parent
What does match is the fact that you can use a huge number of combining characters [1] to form a single glyph; each combining character and the base are a code point, so in order to figure out how many glyphs there are you have to iterate with the knowledge of what code points are combining characters.
comment 14y ago · link · parent
Didn't hate it, but their aesthetic [1] turns out to be totally wrong for me to program to. Instead of droning and textures without rhythm, I need a heavy beat, vocals, and strong melody (or at least prominent and fast arpeggiated synth). Instead of that I tend to listen to di.fm Vocal Trance, if I'm sick of listening to my collection.
90% of coding for me seems to require that I distract most of my brain. When a problem gets really hard I often just turn off the music. I should try listening to MFP under those circumstances and see if it works better then. :)
Regardless: Glad it works for you. Not trying to dis MFP. Different people need different soundtracks.
comment 14y ago · link · parent
For a third time: If the only example that causes someone to benefit is the one where the HFT is losing money, then HFTs are motivated NOT to help people.
So no, I don't count an example where an HFT screws up as a positive. If the best you can say is that "some of my revenues are redistributed to people who otherwise wouldn't have been able to make a sale because there were no other buyers for a particular stock", well, sorry, but that pretty much proves my point.
You're claiming to be a Robin Hood, but without the whole moral justification -- you're robbing from random people and occasionally giving some of your proceeds to other random people. The latter doesn't justify the former.
comment 14y ago · link · parent
>the market moved before his order was filled.
In what tangible way is this different from "the market moved before Fry got his order in"?
The market for a particular stock depends on there being people who are willing to buy it. Saying "the market moved" blurs the fact that there simply weren't any buyers at that price any more by the time he got his order in.
If we're talking about a stock with a lot of volume, and Fry "jumps the queue" by setting a limit order in the current spread (something I almost always do myself, FWIW, based on that same investing advice I mentioned), then he'll sell his stock with or without HFTs. What value does the HFT add in this case?
The argument is that HFTs add liquidity. Don't HFTs only work with stocks that have high volume? How is adding liquidity when there's already high volume a value?
comment 14y ago · link · parent
Sorry, crazy premise. If a particular HFT netted less than $100k/year, I'd be surprised if they kept doing it, and I've certainly heard of HFTs who made in excess of $400k/year.
>There are a vast number of market participants who do loose money.
Irrelevant. It's not about whether people ever lose money, but about whether HFTs add any real value to the market. If no one can give me real evidence that they do, then I say that the rules should be changed to make such trading unprofitable; if it went away, then the people who are actually buying stocks as a medium to long-term investment would make MORE money (on average), or at least lose less.
comment 14y ago · link · parent
[Citation Needed]
My thesis above is that there IS no value added. You're saying that they are being paid for value provided, but other than possibly causing the price to be updated more quickly (on the 100 millisecond scale mostly, but possibly as much as a few minutes sooner), I don't see how that provides any real value. And honestly I don't see how even helping the prices move a few minutes sooner adds any value.
In ALL the examples in the OA, if there were no HFTs and you simply WAITED a few minutes, then the people actually making trades would end up with better deals. Sure the market wouldn't be as volatile and instantaneous, but in what tangible way is that a bad thing?
So, again, how does moving prices a few seconds sooner provide value? The examples given all assume the market would be completely static without HFTs, which is obviously bogus. HFTs are only interested in stocks with minimum levels of volume, meaning there would likely already be a lot of liquidity, and they won't touch stocks with too little volume, where they'd actually be useful (OP or another HFT, correct me if I'm wrong).
I think extraordinary claims require extraordinary proof. It certainly seems to me and a lot of other people like they're stealing money from valid transactions by taking advantage of a corner case in the system; claiming that "price setting" adds value when in the very examples given they don't seem to add any net value (except when the HFTs are doing it wrong and losing money!) seems like an extraordinary claim. So where's the proof that the market wouldn't actually be better off without them?
comment 14y ago · link · parent
Strawman. That's not at all what I said.
In this particular case the only time the market really benefits is when the HFT isn't making money. And I didn't say that "because he's making money it's evidence of value destruction." Just that the only example OP was able to point out that was an advantage to the consumer was when the HFT was losing money.
comment 14y ago · link · parent
I also know that HFTs are taking money out of the equation, not adding money into the equation. If they weren't, they wouldn't be doing it -- and if the only value they're adding is reducing the time that a trade takes place by minutes or seconds, then I still submit that the value added to the stock market isn't worth the ACTUAL dollar cost.
The OP pointed at the example with Fry and Zoidberg. In that case, Leela either makes $0.05/share on the transaction (which otherwise would have gone to Fry and/or Zoidberg), or takes a hit of $0.50/share. In the latter case Fry (say that's you're mutual fund) makes $0.50/share more than they would have otherwise, but that money doesn't come out of thin air -- it's lost by Leela.
But in order for HFTs to do well, they have to make more money than they lose, so for every case like the above where Fry does better than he would have otherwise there is more money lost by people who would have done better without the interference of HFTs.
So for every $100,000 saved by a mutual fund, much more is being siphoned off by HFTs, for no real added value.
comment 14y ago · link · parent
In other words, the better an HFT gets, the less benefit they're providing. This isn't doing much to convince me.
Yes, in that case, it would suck to be Fry. But the problem at that point is that the price dropped before Fry got his order in, and that's a price of doing business in the stock market. Considering that an HFT would do all in their power NOT to be helping Fry in that case, it doesn't really support your position. You're not in this to try to help people like Fry; you're in this to AVOID helping people like Fry as much as possible.
>If you want to take that risk, place an ALO order at the bid or ask price.
ALO? How does that differ from a limit order? I only ever use limit orders when buying or selling stock -- and pretty much every bit of investment advice I've read recommends that you only ever use limit orders, though advice on where to place your limit varies. If "most people" use market orders, well, most people also lose money in the stock market.
comment 14y ago · link · parent
Further, I submit that any HFT will only place a buy/sell spread in the case where the volume is high enough that they can complete their purchases within seconds or at most minutes.
At best an HFT will cut a few minutes (more often seconds) off of the time of a trade. Anyone who is worried about waiting a few minutes for a trade to complete is Doing It Wrong. Therefore, the "liquidity" HFTs provide is only in the cases where it's not truly needed because the volume is high enough to provide it anyway.
I've traded in a lot of stocks where there was very little liquidity, and fewer than a few dozen trades would happen per day. I'd sometimes wait hours for a trade to complete. Where are all the HFTs providing me "liquidity"? They weren't anywhere to be found, because in the cases where the volume is too low HFTs can't make a sure bet. And when the volume is high, they aren't needed. So what good are they again? At any point that an HFT is willing to buy stock, it's because there's a high likelihood that someone will show up to pay more after a few seconds or minutes.
IMO the popular media actually has it right. HFTs really are just stealing pennies on every transaction, because they only enter a stock and "add liquidity" if and when the stock doesn't need it.
The onus isn't on me to prove they aren't providing liquidity, but on the HFTs to prove they are, and the OA doesn't even come close. In every example OP gives, the people actually buying and/or selling stock would have been better off without the HFTs in the mix (at best their trades were a few minutes faster).
If we just taxed or put a fee on a "short term hold" of a stock, say less than one day, then high frequency trading would vanish. I see HFTs as a parasite on a broken system, nothing more, and I'm shocked that so many HNers idolize them.
comment 14y ago · link · parent
I don't see how this gadget is particularly useful in any way, any more than the first "automated chess device" with a midget inside moving chess pieces around was actually revolutionary.
The comments on how it would be useful for the blind (with braille or speech synthesis) is as close as I've seen to a reasonable justification for it. Even then it's a stretch. Beyond that, basing it on Mechanical Turk means every "photo" costs money, and frankly doesn't provide much value.
If you want to caption your photos it would be much better to do it AFTER you've pruned the ones you don't care about, so you're not paying for descriptions of 100 throwaway photos for every keeper. In which case the fact that the camera itself is hooked up to Mechanical Turk is just a gimmick, since it would be easier to run a script on your desktop or on a server.
comment 14y ago · link · parent
But they provide a good service, and they also support NPR. I am under no illusion that every company I do business with will agree with me politically in all ways.
comment 14y ago · link · parent
They just called us up a couple weeks ago and sat on the phone for over a half hour (because we were willing) taking reviews from us on a bunch of companies that we had used.
This is why it costs money; they actually provide a service. If they don't have enough reviews, they hire people to call you up and write up the reviews for you.
comment 14y ago · link · parent
But you can write as much code as you feel comfortable with, I won't stop you. I'm instead using the insights I learned above to write less code.
And sometimes awkward things result, and I refactor. But a lot of the time the "awkward thing" is trying to get OO code to conform to a problem that doesn't benefit from it.
comment 14y ago · link · parent
I once showed my brother a Ruby script I'd written with lots of clean encapsulation and a pile of reusable code -- and then he showed me how he would have hacked it together in 1/10 the code by NOT trying to design it to be "extensible."
There's obviously a balance that you can strive for -- sometimes it IS best to design code to be reused. But in this case, unless my code were reused something like 20 times, I would have ended up with NET fewer lines of code by simply taking the NON OOD approach. And fewer lines of code means fewer opportunities for bugs.
At this point I try to mix OOD with other paradigms, taking advantage of the strengths of each. Sometimes OOD IS the right answer still, but honestly most of the time it isn't. And OOD is verbose compared to other paradigms, especially when you're using a paradigm-agnostic language. (I suspect if you tried to code in Java this way it would fight you at every step, for instance.)
comment 14y ago · link · parent
You need to be either on Bart somewhere or on Caltrain somewhere. Then you'll have tons of options -- in San Francisco, or in the 'burbs/secondary technology areas -- and the commute can be on public transit (to avoid the awful traffic all around the Bay).
And you don't NEED to move before you find a job. Suck it up and drive for two or three hours to interview if you have to. Try to get several interviews on the same day in the same area if you can. And make it clear to them that you're planning to move for the job -- some companies don't care what your commute distance is, but others do actually care how happy their people are, and assume that someone commuting 10 minutes will be happier than someone commuting two hours.
Good luck.
comment 14y ago · link · parent
If I'd put "10" in TCP/IP for that company, I would have been slammed in the interview. As it was I passed. Apparently no one ever remembers the CRC byte in the TCP header. :)
comment 14y ago · link · parent
It's certainly not the Bay Area in California, where there are far more jobs than competent developers. I'm out in Colorado, and I still get constant offers even though I'm not looking for a job.
If you're not able to learn what's required, then maybe you should question whether you're in the right field. I've been keeping on top of HTML, CSS, backend development and server administration, especially high performance servers and NoSQL databases, with a smattering of JavaScript on the side, in my spare time while working on video games as my full time day job. Suddenly I'm finding that I needed all of those skills after all; understanding the whole stack can be quite useful, it turns out.
If you don't even have a day job, then you should have plenty of time to become an expert (or at least competent) in at least one narrow field that people are hiring for. If not, then there's no way you'd be able to handle a serious job if you were hired, since just about any job you take will require that you do a lot of learning on the job.
The key skill to have is how to learn. Unfortunately school (elementary through University) tends to hammer that skill out of people. Try to find it and reclaim it. Then build something that you can show off to prospective companies -- or sell it yourself! Good luck.
comment 14y ago · link · parent
Reading Commications of the ACM (most recently, [1]), there's been an ongoing problem getting enough people into computer science programs (in large part because of the broad fears of "outsourcing"), and the projections are that EVEN MORE graduates will be needed through 2020. [2]
So yes, many times yes: This article is completely and totally wrong. And as adrianhoward says, it's the same sentiment that my parents chided me with back in the 90s, and that I hear all the time from people who imagine that the silver bullet is just around the corner that will make it so that we need fewer rather than more programmers. (FWIW: My degree is in "Cognitive Science", the "other CS", and I haven't had problems getting jobs when I've wanted one.)
And as an aside, if you look at the graph with yellow and brown bars about 2/3 of the way down [2], getting a job where math is the primary required skill looks like a slog (looks like about 2x as many math grads as math jobs), while in order to hire people AT ALL, companies are going to have to ignore whether they have a computer science degree, because there are nearly 3.5x as many jobs in CS-related fields as there are graduates in CS.
Based on these numbers it looks almost inevitable that we'll see echos of the "You've put together a web page? By yourself! You're hired!" dot com boom, just because it will be so hard to hire anyone at all.
So, while the story was cute, its premise is FUD that has a chance of scaring people away from CS at precisely the time that we need more people in CS. OK, end rant.
[1] http://cacm.acm.org/blogs/blog-cacm/148620-hot-job-market-fo...
[2] http://cs.calvin.edu/p/ComputingCareersMarket
[edit: typo]
comment 14y ago · link · parent
There are other brokers that charge $0.01/share traded or less.[1][2] A $0.10 spread becomes easy profit if the buy/sell only costs $0.02.
The linked broker below requires you to be an "expert" before you can sign up -- you have to have made at least 100 trades -- but otherwise just about anyone can sign up.
I have NOT tried to use them for day trading (or at all, for that matter), so please don't consider this a full recommendation. Just trying to show that there ARE other options that are cheaper.
[1] http://interactivebrokers.com/en/general/education/comparebr... [2] http://interactivebrokers.com/en/accounts/fees/stocksPricing...
comment 14y ago · link · parent
I would worry about releasing this feature publicly at all, since it might jeopardize your existing apps when Apple realizes you're able to push changes to code. They used to ban all scripting languages in large part because they were worried about developers pushing new code to apps; after a lot of pressure from various directions, they relaxed the scripting language restriction, but it's still quite explicitly against the developer agreement to ever download new code to an app.