Demystifying the i-Device NVMe NAND - <AUTHOR> http://ramtin-amin.fr/#nvmepcie <comment><USER2>
        > In order to read the NVMe, I therefor developped a PCIe card with a Zero
        > Insertion Force reader. I brought the JTAG part to 20pin header. The hard
        > pard in here is the signal integrity of the differential pairs. In order
        > to do so, I had to use multi layer PCB, and have the impedence match by
        > knowing the stackup, materials used for prepeg and so on..

Posts like this are very humbling. They serve as a good reminder that no matter how far I've come and how much I've learned, there will always be someone out there who knows vastly more than me like the back of their hand.

<comment><USER3> Don't feel too bad.

Fully understanding the complete stack of a modern computer system is outside the scope of almost everyone. These things are complicated and we've built abstractions, interfaces and modules to manage the complexity.

People specialize in their own fields. I am trained in digital integrated circuit design, but don't ask me to build a file system.

<comment><USER4> Exactly. This is super impressive work, but also very specialized. Even for non-EE majors, most IT people could at least understand the basics of what he was doing.

</comment></comment></comment><comment><USER5> The gold is at the bottom:

      The idea here would be to see if it was possible to control the NVMe
      over jtag in order to ask it to perform a DMA read over the PCIe Bus.
      In order to do so, the PCI_COMMAND_BUS_MASTER has to be set to 1. We
      can assume that since the chip is using remote RAM, it is allowed to
      act as a master over PCIe. Here is a snippet of the probing function
      of the kernel driver.

(code)

      Our goal here is to force the DMA to happen just by controlling the
      ARM of the NVMe over JTAG, in order to ask it to dump the region we
      alloc'd in kernel and see if we get the data out of it.

In other words, full root exploit of the phone from the NVMe JTAG pins.

<comment><USER6> > In other words, full root exploit of the phone from the NVMe JTAG pins.

Sure, except the data on the device will be encrypted. The keys are kept in the iphone's tamper resistant security enclave. Android and iOS both have full disk encryption enabled out of the box these days. (On iOS I don't think you can disable it.)

<comment><USER7> That isn't the point. This exploits the host, which holds plaintext data in memory.

<comment><USER8> No, it doesn't exploit the host. The "Host" in the case of such an NAND device is the Baseband SoC, not the ARM controller on the NAND device. You can be pretty sure that Apple did _not_ include decryption on the NAND chip itself. That would defeat the point.

<comment><USER7> That isn't what he's describing. He is commanding the storage controller to initiate DMA from host memory over the PCI-Express bus.

<comment><USER8> Ah good point.

However, he does this by using the NAND as a PCIe master, which implies that the peer (main SoC) would be switched to device mode, and the whole PCIe handshake happens properly.

While I can't dismiss that possibility entirely, I'm not holding my breath for it to work out.

<comment><USER9> No, you don't have to switch "Master" and "Device" mode (what does that even mean in PCIe?).

You might be surprised to hear that your networking card, the AHCI-SATA interface and even the sound-card soldered onto your computer's mainboard is allowed to, and does, read from and write to your computers memory whenever you are using it. {that's just where I had to dig in, in the past, almost any modern peripheral uses DMA}

If the operating system needs a block from your harddisk to be read, and stored in a certain memory location it will actually tell the physical memory location to the AHCI controller and tell it to write the contents into memory, on it's own. It will signal an interrupt when it has finished transfering the data.

Your networking card will have "ring descriptors" which tell the card a list of buffers (in RAM) into which to save new incoming packets. It will raise an interrupt after it has finished writing to the first buffer.

Your sound-card will likewise have a list of buffers from which it reads, and to which it writes just as you are listening to mp3s, or having a phone conversation with google hangouts.

The worst offender would probably be Firewire which, _if_ _not_ _configured_ _to_ _block_ _this_ (modern OSes do), allows these reads from/writes to memory triggered by any connected external device, and from/to addresses supplied by this external device. It can be a huge help for debugging, though.

On typical computers, there's no safeguard against this happening. But some have a IOMMU which can be used to limit DMA and redirect DMA accesses with respect to physical memory.

<comment><USER10> To what degree can misbehaving PCIe devices (as in the device as a whole being malicious, not simply manipulated) override IOMMU protections? Can they pretend to be another device or otherwise send unexpected signals to confuse this defense?

<comment><USER7> Violating the timing specs for PCI signalling would put the whole system into an undefined state. It's possible you could glitch the thing on the other end into doing whatever you want. Who knows?

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER11> Refreshing to see a deep tech article on HN. I really liked how he debugged the code on the controller

</comment><comment><USER12> >It looks like to reduce the size needed, the NVMe core uses the host DDR in order to work. Therefor, apple is not strictly following the specification regarding the initialisation.

Yikes.

<comment><USER4> Doesn't surprise me; Apple for not doing anything by standards. When you control all the hardware, I guess it doesn't matter. You can have broken ACPI and driver implementations all over the place.

I've started to give up on ARM embedded boards for the same reason. You need to build out images for all the different potential ARM systems if they don't use device trees. There are Intel Atom/AMD Geode Pi/Beagelboard clones that will boot up just like a desktop and you can install most Linux distributions right on them without modification.

If ARM ever decides to start selling an architecture spec instead of just a SoC spec, I think it would go a long way at making it a better platform. I'm pretty sure Apple would still ignore it f

<comment><USER13> Its happening (slowly) SBSA/SBBR/etc are out there and being implemented. Its just taking a while for EDK2/linux/etc to get to the point that it can run on a random ARM SOC. Once that happens though, suddenly you have a machine that can install off the shelf linux distros. Right now, There are only a couple systems that work like you would expect (mostly AMD Seattle machines, although there are a couple others) but over the next few years I would expect that the firmware guys to start expanding the device compatibility.

Eventually (particularly with ACPI) it will become apparent to the ARM ecosystem, that they can make their devices compatible with the standards, or they can spend millions on engineering effort to build their own firmware/OS stacks that will perpetually be behind the capabilities of the rest of the ecosystem.

</comment></comment></comment><comment><USER14> Apple's purchase of Anobit is paying dividends!

<comment><USER15> Sometimes i wonder how many companies Apple has bought that now simply exist to make parts of Apple products.

<comment><USER16> Somewhere in the vicinity of 20 companies.

What's interesting is that about a third of those companies we have yet to see the output of. Expect Apple to get into AR/VR in a big way in 2017/2018.

</comment></comment></comment><comment><USER17> Has anyone managed to capture the text of this article? It doesn't appear to be in a Google cache AFAICT.

<comment><USER18> [https://archive.is/FGIiC](https://archive.is/FGIiC)

</comment></comment><comment><USER19> Definitely one of the cooler and more in depth posts this year, what a great read.

</comment><comment><USER20> Very good stuff!</comment>


Why Roman concrete still stands strong while modern version decays - <AUTHOR> https://www.theguardian.com/science/2017/jul/04/why-roman-concrete-still-stands-strong-while-modern-version-decays <comment></comment>


I'd rather hire a foreigner  - <AUTHOR> http://money.cnn.com/2013/02/07/smallbusiness/hire-foreigner/index.html?iid=Lead

<comment><USER2> I couldn't help see the Irony. The writer was from Nigeria.

I totally support hiring the best person for the job and hope that one day foreigners will be seen as better (more creative, capable) instead of just "push themselves" which usually translates to "works more hours".

</comment><comment><USER3> In the U.S. it's illegal for employers to discriminate on the basis of national origin. So non-immigrant U.S. citizens who got rejected by his company could now use Ayeni's own words in this interview as evidence in a lawsuit against him.

<comment><USER4> I think this is only for companies over 49 people right? So as long as he has small co's he's fine with that opinion/approach no matter how iffy it is.

</comment></comment><comment><USER5> This guy isn't making anything important anyway. He isn't needed here nor are the foreigners he wants to hire.

</comment><comment><USER6> In the article the writer references "Europeans" - I wonder if they are Western Europeans or otherwise?</comment>


Ask HN: Confused semi-newbie programmer needs some advice. - <AUTHOR>

Hey HN, this is my first submission, but I've been reading HN for quite a while now.
Last spring I completed my first year of study in Computer Science, at a relatively large American university. I took two courses in CS: Intro To Programming, and Data Structures. Both of these classes taught exclusively C++.
Besides a little Python (that I've completely forgotten), that is my background in programming.
Initially, I was satisfied with the courses I took. I'm taking a year off to travel (currently, I'm living in Japan), and I've been doing a bit of thinking. I've begun to realize, that while my professors preached that they were trying to teach me the underlying algorithms and not the language, I really only was taught how to do stuff in C/C++. I recently have been playing with SBCL, and I realized that I had no idea what I'm doing. I feel like most of the concepts they taught me depend completely on the way C++ works.
I've decided to correct this. I won't be back at the university for another 10 months, and during that time I want to learn a new language.
I've seen discussions about Scheme, Clojure, CL, C, C++, Java, Haskell, Erlang and so many more.
In your opinions, what should I learn, and how should I learn it? I don't really care about usefulness in the workplace, I just want to see what I know, and I want to learn more.
Anyway, I'm just feeling a little discouraged. I hate feeling like I'm wasting my time at a university to a tune of $20,000 a year. I'm sure I've learned valuable stuff, but it all feels very one-sided.
I really appreciate any advice. I've been really impressed with the entire community here, and I dislike feeling as though I have nothing to offer back. <comment><USER2> Learn Unix on a real OS; like BSD or Slackware.

High level programming languages are froth; once you understand the basic concepts, it's best to work with C and system calls til you're absolutely sure what you are doing. Learn how to use a debugger, disassembler, packet sniffer and every utility you can find for creating mischief.

A few books on _actual_ hacking, you know, the "blackhat" kind, might come handy. Hacking tutorials from the underground scene are masterpieces of juvenile bravado but they're written by people with heart. No one in academia or industry has the same passion for computing, or for that matter skill, as those "vandals".

Get a screw driver and take your machines apart (yes, get more than one machine.) Network them. Break them. Boot obscure OSes on them. Get as many computers with different architectures and instruction sets as you can get.

You don't deserve to be coding in a fancy functional distributed language with rad tools. You need to pay your dues first and get your hands dirty.

Your university probably sucks; your professor, your TA and the A-student in your classes are probably all lousy programmers. Your library there is under- stocked. Any industry representative who comes to give a speech about computing is probably a fraud. And once you graduate, or drop out, and make computing a profession; if you ever have to assemble a team of top-notch programmers to work with, the first names to standout will be strangers who you know by their nicknames from underground computing subculture. The guys you see doing interviews and recording lectures in polo shirts and khakis are laughably incompetent, big enterprise or "startup".

Join the demo scene, the amiga scene, the root-kit scene, the virus scene, the calculator hackers, etc. to see what good programmers look like. Real, honest to goodness hacking without blogging, self-promotion or careerist pan- handling. They do it for the love it, them honest thieves.

<comment><USER3> I often see this kind of advice and it always reeks of "I went through this and I turned out ok, so you should do it too."

The problem is that I think it's completely the wrong thing to do. One of the major effects of programming in a language extensively is that you start to "think" in that language whenever you have a new problem. This is both good and bad, of course, because while it helps you become proficient in the language, it also prevents you from seeing possibly simpler solutions (i.e., that aren't easier in your language).

Also, languages don't arise in a vacuum -- they're designed in a certain time period, with various assumptions about environment and hardware baked right in. This can be extremely dangerous because as a user of the language, you will start to think in terms of those limitations as well, even if they no longer apply! So for example, C is one of these languages I'd strongly NOT recommend, unless you're working in a domain where it's necessary/preferred (low-level networking, some embedded devices, etc). C assumes you live in a time when computers are quite slow and have little memory (both of which must be very carefully monitored), there's only 1 processing core (so you can just do sequential programming), and programmer time is less valuable than execution time (so you can spend days optimizing the hell out of small routines). But the times have changed -- computers are fast, they all have multiple processors, there's a lot of RAM, etc. Most people want to be building more complex things, and for 95% of applications, I'd wager that C is exactly the wrong language to be "thinking" in.

Starting with a more "modern" language (which includes the LISPs, despite them being older) lets you avoid these preconceptions.

Also, there seems to be a lot of penance involved in the parent's advice -- "you need to pay your dues first and get your hands dirty." Fuck that shit.

Sure, if your end goal to is to really learn this low-level stuff, then go for it. But if your interests lie elsewhere, do that instead by jumping right into that domain. Maybe you want to build large distributed systems, or come up with new visualization tools, or build a logic system. C seems like a remarkably bad choice for these and so many other projects. In fact, it seems like a bad choice to even learn C first, precisely because your notions of what's possible, of the "right" way of approaching problems will become infected with the C mindset.

Most importantly, motivation is a key resource you must not squander. For many people, fixing broken computers, struggling with a difficult operating system, or looking at assembly and network packets is grueling work with no payoff. I'd be willing to bet that for such people (many of whom could be great hackers in other domains), the parent's advice is sure to sap your morale and turn you off from programming.

Finally, time is not an infinite resource either. Why waste your life on things that don't interest you and won't help you much in the long-term? Work on things that excite you, and you'll not only be so much happier, but you'll also learn much more in the long run.

P.S. I know several "real hackers"/"good programmers" and while some of them might fit the parent's description of such, many of them also fit the parent's description of the poseurs -- the A-student in my class back in college, the guy recording lectures in polo shirts and khakis, the family man with a wife and kids and a mortgage. Stereotyping is still stereotyping when applied in the opposite direction.

</comment></comment><comment><USER4> This is probably different from the other (great) advice on this page, but here goes.

If you have 10 months before you got back to university, I suggest, you work with _one_ language and build something substantial in that time. It doesn't matter which language you select (and this is where my advice differs from those of people who recommend lisp/Haskell and so on, you could choose C or C++ or Java, it doesn't matter).

The key is to make something substantial, but which also has a lot of intermediate stopping points (a ray tracer/renderer is a good example, it gives you visual feedback of your progress) and work on it _every_ day. Writing a large program is substantially different experience from working through toy examples and you will learn a lot, irrespective of the language you use.

Of course you could still use lisp or haskell or smalltalk (EDIT: if you are already somewhat familiar with them, learning a new language and building something large is tricky) if you so choose, but it doesn't matter really.

Just build something ambitious.

My 2 cents. Good Luck.

<comment><USER5> Building something and learning from your mistakes is indeed the best way to learn, but doing something ambitious in a language you don't really know means that you're going spend a lot of time on doing and re-doing the structure of it, and that requires a lot of patience since you'll get so little feedback.

I'm a very impatient person, all the side-projects I've made have had very tight feedback loops, where you quickly get results and can change them and see your project grow. My first language on the side was PERL, which is a very unstructured get-stuff-done-fast kind of language which suited me perfectly at that time and was fun to learn, for me.

Horses for courses, etc.

<comment><USER4> " but doing something ambitious in a language you don't really know "

I never really implied "language you don't know". My advice was "use a language you know and build something ambitious" (vs trying to find the ultimate "cool" language). I'll edit.

"Building something and learning from your mistakes is indeed the best way to learn,"

This is what I was trying to say, (with "something" != tiny programs). I know many people who "know" many languages(and try to know more) but haven't built anything substantial with any of them.

</comment></comment></comment><comment><USER6> You're sort of finding the pleasure and pain of a CS degree: Data Structures doesn't teach you how to program, except in a superficial way in a single language. It teaches you how to manipulate certain building blocks of our field. You'll be thinking in terms of lists, sets, and hashmaps until the day you die, no matter what programming language you eventually end up using.

Now, in C, working with lists requires knowing a bit about how pointers work. If you worked in a different language and used the language's libraries, you might literally never think about how the list is internally represented ever again, and concentrate solely on the API for it.

The biggest suggestion I have for supplementing (not replacing) your expensive CS education is building stuff concurrently with learning stuff, and I don't mean the little toy 100 line projects they assign you for school. Unfortunately, with where you are in the world right now, building stuff is hard. However, if you teach yourself HTML and get ONE dynamic language half- way under your belt, you'll be able to do web programming, which greatly simplifies displaying output to the user. Then all you have to do is do string processing, and blam, you have something FUN to show to the user.

You'd be amazed how far you can get on just combining those simple building blocks. As you grow in expertise, you can go a LOT farther, but for now, learning how to take input from the user, do some crunching, and show them a web page gives you many, many options for doing fun things.

<comment><AUTHOR> Thanks for the advice. I do know HTML. Simple webpages made great income for a highschool student.

Should I go with simple Javascript, or something more? I only did HTML/CSS, nothing at all with dynamic webpages.

<comment><USER7> Javascript and PHP or Ruby.

</comment></comment></comment><comment><USER5> When I started a CS program 15 years ago now our first language was Scheme. This turned out to be an excellent choice, because it put everyone on the same level. The syntax is so simple that those with no experience could focus on the algorithms, and it is a functional language, so those with a lot of experience, typically from imperative languages like C or Pascal, had to effectively start over.

So when we later got to C, the new things were the syntax and the imperative model, but most students had learned enough about algorithms to know what they wanted to do, which made it a lot easier to learn.

After that we also tried out Prolog, which belongs to yet another paradigm, so over the first year we tried a variety of languages that got you thinking very differently about programming than if you'd only do an imperative language.

Later on in the program we had some courses that went down closer to hardware, we did assembly language, and we even wired our own processor, did the microcode for it, and wrote a small assembly program for the "computer" we made.

Over the course of the entire program we never dug deep into one specific language or paradigm, but we went across the entire field of computer science, and that turned out to be an excellent foundation. In my experience, the people I know that are really good programmers have all done this, either through university, or by self-study. It requires a lot of passion for programming to do it by yourself though, but it's an alternative to finding a diverse CS program that focuses on breadth instead of depth.

<comment><AUTHOR> That sounds fascinating. I'll dig through the course catalog and see of there's anything comparable.

<comment><USER8> If there is, by all means take it. In case there isn't, though, here are some books I've found particularly helpful teaching myself the same material. (This is a lot of reading, and they'll take time to work through. Alternating between studying theoretical stuff and working on real projects will help keep you grounded.)

First off, absolutely get a copy of _Structure and Interpretation of Computer Programs_ (SICP: <http://mitpress.mit.edu/sicp/>) - this is one of the best books on programming I've ever seen, and while it uses a subset of Scheme, it's really more about major concepts in CS. It's _excellent_. Do the exercises. It will take a while, but do the exercises.

For C, get _The ANSI C Programming Language_ by Kernighan and Ritchie ("K&R"). Harbison's _C: A Reference Manual_ is a good reference.

If you do real work in C, you might find Lua helpful - it's a C library that provides a drop-in scripting language for C projects. It's a also nice language in its own right, simple but very expressive, and stylistically somewhere between Python and Javascript. (_Programming in Lua_ by Ierusalimschy is the only book you need, though having a printed copy of the reference manual wouldn't hurt.)

Prolog is a fun language. You'll probably need to stick with it a while before it switches from being weird and novel to actually useful, though, and be prepared to be a little disappointed upfront - some of the early AI hype oversold it. It's actually pretty lousy as a theorem prover, but it has a unique programming model that is very powerful for some problems. (It will also help if you want to learn Erlang later.)

For Prolog, I like _The Art of Prolog_ by Sterling and Shapiro. It's on logic & declarative programming as a paradigm, and how well Prolog lives up to it. It's deep, and uses Prolog to teach about programming in general, much like SICP does with Scheme. _Highly_ recommended, whether or not you use Prolog in the long run. (The newest edition is kind of expensive, but you could get by with the first edition. They fleshed out the latter 'project' chapters a lot in the second, though.)

As a reference, _Programming in Prolog_ by Clocksin & Mellish is good. I also liked _Clause & Effect_ by Clocksin; it's sort of like _The Little Schemer_, but for Prolog. _The Craft of Prolog_ by O'Keefe is great, once you're comfortable with the ideas in _The Art of Prolog_.

The thing that made data structures really make sense to me was learning OCaml. (_Developing Applications with Objective Caml_ is free online: <http://caml.inria.fr/pub/docs/oreilly-book/>) Having a garbage collector helps, and the ML family has powerful tools built-in for working with types and data structures. Doing the exercises for the first three or four chapters of that book is enough, if you're only going to use it to study data structures. (It's a great language, too, though.)

Edit: Added Lua subsection to C.

<comment><USER9> The Art of Prolog is a beautiful book. I keep it on my coffee table, and non- programmers are always curious about it because of its cover. They sort of blanch when they open it, though...

</comment></comment></comment></comment><comment><USER10> I´m a CS graduate too (fifth year) and i know how you are feeling.

Before entering the course i was skeptical , and until the thirty year i fell like i was wasting time. The point is, when you are at the academic world, it´s not about how get real things done, it´s more about to learn general concepts to build a solid base (in terms of knowledge). With this base, you will be able to learn how to get REAL thinks done much more fast, in a very professional way(read, trustable for the "market").

Therefore, you are not going to CS (or Math, another good option) to get things done, you are going to build a very good "BASE" to get (a lot of) things done.

In a simple way, goes like this: Learning lisp, python, c++ and java, you are investing on "content" for your professional life. Going to CS you are investing in "context". A guy who learns lisp in a garage is very different from a guy who made CS and learn lisp by himself. The second one have much more "base" and a better context to solve problems, although both have the same "content" (the lisp knowledge).

Don´t give up on CS and try to be close from as much people as you can, specially the good guys ... in this way you will be building a very good "context".

Oh, about the programming language ... i think you are starting from the wrong point. First, you should pick up an idea or project to implement (something that you really want to do) and then you go for the language. And yes, the best way to get "content" is working on real projects. Ruby is good for scripting, as python and php are, so if you are going to build something for the web, you should not think about C, C++ and Lisp, just pick a language more close to the web related stuff. But if your idea, or project is about mathematics, desktop and hard calculations, forget about ruby and php and go for C or Lisp. Therefore you start choosing a project (or idea) and then the programming language to learn, not the language and then the idea.

Well, i´m a very noob just like you, and my words are probably full of lies, but that´s my experience in the last five years. Hope you can get something useful from this big (sorry by that) post.

And sorry by my poor english.

<comment><AUTHOR> I guess I hadn't thought of it that way, with content and context. I did enjoy working with other students, and I think hacking code with them was very valuable for learning.

Thanks for the advice, and your English is just fine. Obviously not perfect, but more than good enough.

</comment></comment><comment><USER11> I would recommend learning JavaScript. Java, VB, PHP, etc. are pretty much all the same in comparison to JavaScript. I'm not talking about syntax or patterns but about general purpose. In my opinion, JavaScript is the most important complementary technology to the - what I call them - backend languages.

Today, web-enabling almost always is a requirement. People usually want access to their applications with their iphone and in the worst case (the battery just exploded, notebook lost, etc.) from a cybercafé.

Sure, you can web-enable most (business) applications with pure HTML/CSS. But if you take advantage of the power of AJAX (XMLHttpRequest), you can build GUIs with such high performance that it feels (almost) like a regular desktop application and therefore people often don't even care about installing the available client-application on their office computers. People love it if they don't have to install anything at all.

I would start with something like that: Imagine you're abroad and your notebook just fell down the stairs - it's broken. What would you like to have access to in that situation from a cybercafé. Maybe an address book? Now imagine, that the cybercafé you are into has an awfully slow connection and they charge you a fortune for every single byte that travels their connection. So, your address book should be fast as lightning, means: nothing similar should go over the wire more than once (search box, headers of your address list, pagination elements, etc.). There's nothing that can beat JavaScript in solving this problem.

<comment><USER12> I think JavaScript will become a good option for the server, too (or already is so). Furthermore, lots of things can be scripted with JavaScript, including Photoshop. Although a couple of years agao I was warned against scripting PS with JS, so I am not sure.

</comment></comment><comment><USER13> First, don't feel that you have nothing to give back - not everything is about programming ;p.

Here's a bit of my personal experience. almost two years ago I took my first _formal_ programming courses. It started out with Algorithms (DFD, etc.) and Operating Systems. Then we moved on to C++. At first, I felt just like you: aside from the basic programming principles and logic I learned in Algorithms, all I knew was how to do stuff in C++. I took up Ruby (mainly due to Rails, but it helped me discover a wonderful language).

The curriculum progressed: Java, Delphi, SQL, Visual Basic, .NET, PHP, HTML&CSS, (which I already knew), etc.

You'd be surprised at how much these concepts come back and help out. Basically, what you learn in the first couple of classes is not "how to do stuff in language x", rather how to think and develop an effective algorithm, which can be applied to any programming language. Right now, you know how to do stuff in C++. When you learn another language, you'll just have to learn the syntax and some other quirks, and you'll pick it up quickly.

For example, in my class we took up a good level of Pascal and Delphi in 2-3 months of class, which is not too shabby.

</comment><comment><USER14> I'm going to say learn/refresh your python. it'll let you focus on the programming, and not have to worry about language specific constructs.

Good refresher: <http://www.diveintopython.org/>

<comment><USER15> Python has always impressed me as an extraordinarily pleasant language, easy to learn and plenty powerful. I second the recommendation.

</comment></comment><comment><USER16> Do not worry about your education getting wasted. C/C++ are probably the most useful languages you can learn. This is the case because (a) most existing code is written in C/C++ and (b) C/C++ are probably as low level as one can get while being hardware agnostic, which means programming C/C++ will teach you the nuts and bolts about computers. Also, if you actually manage to learn C and C++ well most other languages will come to you much easier. So you should consider yourself lucky your school is teaching those languages instead of switching to something they think is easier.

But it is still a good idea to learn a new language just to get a new perspective. I would recommend that you learn a highlevel functional programming one, like Lisp, Scheme or Haskel. This will really give you a different perspective from C/C++ and teach you to think about programming in a completely different way.

I strongly recommend you check out this Haskel tutorial (which I found on HN myself):

<http://learnyouahaskell.com/>

</comment><comment><USER17> Learning languages in different families teaches you to abstract away the abstract algorithmic concepts from the language family specific concepts. If I were designing a CS program, I'd probably include:

      - C (imperative)
      - Python (object oriented)
      - Scheme (functional)

Interesting with that selection is that none of those are my weapons of choice in their niches for actual projects (I prefer C++, Ruby and Scala), but those above are a bit cleaner since they cling more purely to their respective models.

<comment><USER18> C is indeed imperative, but so is python and scheme too. In fact, both scheme and python are multi-paradigm languages, where both support functional (lambda calculus), object-orientation and imperative statements. If you want to focus on learning your computer, in a von Neuman way, then C is perfect. C++ is a dead horse, that should be left alone. But with scheme, you can focus 100% on algorithm development. That is not true with C/C++, which strictly speaking requires extreme caution with regard to manual memory management. Python is fun too, but has mainly gained more momentum than scheme because it has a more pragmatic focus on building and maintaining libraries with backward comp.. If the God of scheme manages to summon their rXrs camps into one 'multi-cultural' one - then we can expect scheme to mainstream adoption.

</comment></comment><comment><USER19> I'm a fellow CS student, but I'm a bit deeper into the curriculum. As a Junior, I'm just now learning other languages in class. I see those first two years as something necessary. It's fairly trivial for me to sit down and read most OO languages now that I've been taught Java for two years in college (plus one year in high school). After learning the syntax, it's far easier to take apart those concepts that they're teaching you and apply them to other languages. Implementing a linked list, for instance, is fairly trivial from one language to another, but you have to fully understand the concept of a linked list before you can implement one in multiple languages. I assume that you still have a stumbling block when it comes to parsing the language, and you're missing out on the concept.

I don't necessarily believe you should keep chugging away at C/C++ until the language kind of disappears and you're left staring at the concept, but if you jump from language to language hoping one will open up things for you, I think you're walking the wrong path. My suggestion is that unless you fully intend to truly learn another language, you should stick with C/C++ and just progress with it. Once you are really comfortable with it, move on to something else. Trust me, once you do have that first language under your belt, the others come a lot more easily.

If you really do want to switch to a different language, I would suggest Python. I learned Python the summer between my Freshman and Sophomore years, and I felt that the language gets out of your way a lot more than Java (the only language I really knew before then). I think Lisp or Haskell might be a bit too much of a stretch from your C/C++ background. I've heard programmers that have been programming for years stumble over Lisp. It's a different way of thinking, and if you're just trying to broaden your horizons, you should be able to do that without learning a different way to think.

I'd also fallow the advice of some of the other people on here and actually build something. I've had a lot of fun doing web development with Ruby on Rails. Ruby's a great language as well, but I found it a little harder to parse coming from a C++-like language than Python. I've heard great things about Django, so maybe you could try building a web app in it?

<comment><AUTHOR> I'd forgotten Django. That sounds interesting. I did enjoy Python when I used in in Highschool, and I wouldn't mind learning more.

About your other point, with sticking to C/C++ until the language disappears, I think I'm just afraid I'll get stuck in that paradigm, and if I don't broaden my horizons now, I'll have a hard time later on. You may have a point though. I'll think about it.

Thanks for the advice.

<comment><USER15> I agree that you should broaden your horizons. It gives important perspective, and makes your mind a lot bigger. There's more than one way to do it, of course, but here's a sequence of languages that I would recommend:

Python: this will teach you to program at a higher level, and the libraries will make it easier for you to get into web programming or GUI programming or simple game programming or any other thing that excites you. That's what it's all about, when you're learning: do something that excites you, and you'll learn faster. Python has a very low barrier to entry, so try this first.

Lisp: once you know Python, you're not going to be bowled over by things like garbage collection. But you can still learn a lot from Lisp; if nothing else, it can give valuable practice with recursion and metaprogramming and the idea of a read-eval-print loop. It's a cool and fun language.

Haskell: this one is kind of difficult to learn, which is why I recommend learning it _after_ you've got Lisp under your belt. A lot of advanced computer science stuff tends to debut in the Haskell community, and the average intelligence of Haskellers is pretty shocking. It's also a neat language that you can do cool projects with.

If you can learn these languages, I guarantee that you will be able to shift paradigms a lot easier than people who coasted along with the standard trio of C, C++, and Java.

</comment></comment></comment><comment><USER20> What they teach you as C/C++ is the final point that these languages have come. It is the final outcome of their evolution. It is absolutely normal that you don't get it when they teach you encapsulation, classes, functions, return values, arguments.

How did they get created or conceptualized in the first place? Why do we need them?

Do it the right way: Start with C, and start from the smallest and most fundamental constructs that C has: The structures and functions. Know that there was only assembler in the first place. Then look into how function calls are made. Disassemble the simplest function you have and understand its logic. Now you know why there is a function. Then go into the structure. Disassemble one. Put different types in it, see how they get laid out in memory.

Start as above, and learn how things work down to the last byte. Then eventually you will cover all constructs created and you will know where they come from. Do the above for 3-5 years, each time you encounter a new language idiom or concept.

Finally you will see that in all strongly typed languages most constructs are worthless and they get in your way. You will get back to using C ;-)

You might also go for the much higher level languages or different areas of computing, but since you showed interest in understanding programming deeper, this is the way to go.

</comment><comment><USER21> OK, a bunch of others recommended it, but I'll add my voice and recommend SICP. There are lots of good books on programming, but it is the best single source. After that, decide what parts of programming you like, and come back asking for more specific books.

Good luck.

Oh, and the stuff Mahmud said about your professors and industry types being phonies is largely true. Not always, of course, but often enough. That you're even on this site suggests that you're prepared to think deeper than them.

<comment><USER22> I wouldn't call my professors "phonies", but it's true that many of them were certainly poor programmers. But that's fine, because they're professors in a CS department, and CS is not programming.

</comment></comment><comment><USER23> Well your coming to that realization 15 years earlier than I did. I developed commercial apps in C/C++ and only recently have discovered lisp and other related languages, and just find them to be much more enjoyable to think and hack in.

If you want an absolute mind blowing trip, grab a copy of scheme or a lisp variant such as Clojure [hip at the moment].. and work through SICP - 'Structure and Interpretation of Computer Programs' the classic course by abelson and sussman of MIT.

You can download the lecture videos and the full course is online. Seeing how they introduced lisp programs to calculate derivatives and do symbolic algebra was awe inspiring.

Language does matter : Python Ruby Haskell.. all respectable, but Id go to the source for some subtleties you'd enjoy - lisp is probably the foundation of all computer languages in some mathematical sense.

<comment><USER24> Fully agree with this, SICP won't make you an expert, but it will take away much of your feelings of being lost.

Text: [http://mitpress.mit.edu/sicp/full-text/book/book- Z-H-4.html#...](http://mitpress.mit.edu/sicp/full-text/book/book- Z-H-4.html#%_toc_start)

Videos: [http://groups.csail.mit.edu/mac/classes/6.001/abelson- sussma...](http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman- lectures/)

I'd recommend at least the first video lecture and see if you like it.

</comment></comment><comment><USER25> IMHO as a learning language nothing beats LISP. It's a little tricky in the beginning, but the pay-off is great simply in the way it changes your perception of programming.

This is a great place to start: <http://gigamonkeys.com/book/>

<comment><AUTHOR> That's what I've been working off of for the past week or so. It's been really fun, I think I was just wondering if it's everything people say about it.

Thanks for the input. I wouldn't mind continuing with CL. Many people I've talked to said they find it incredibly useful for small projects that they need to throw together in a short time.

<comment><USER15> I love the way that Lisp lends itself to incremental testing. You can discover most bugs just by testing functions at the REPL. If you plan to continue with Lisp (hooray!) then I would recommend becoming familiar with SLIME if you're not already.

<http://common-lisp.net/project/slime/>

</comment></comment></comment><comment><USER26> I'm not saying it should be rule number 1, but every CS student needs to understand they are learning the topic of the course title, not whatever language is used to teach the topic.

You are not in a CS curriculum to learn C++,Java,Scheme,etc.

</comment><comment><USER27> Scheme with <http://www.htdp.org>

</comment><comment><USER28> I've been fascinated with scala ([http://www.victusspiritus.com/2009/10/31/im- having-way-too-m...](http://www.victusspiritus.com/2009/10/31/im-having-way- too-much-fun-reading-a-programming-book-beginning-scala)) recently.

The perks: functional and object oriented compact syntax lift is an excellent web framework appears to guide design towards application or library perspectives Dave Pollack feels that his perception of programs and functions has changed to state modifications and data transformations. I don't quite see it but I'm a noob.

</comment><comment><USER29> you should just pick a language and build a project. The language doesnt matter.

You will probably get involved with many languages in the future.

Every language has its purpose.

</comment><comment><USER30> Scheme.

<comment><USER8> Hi. It looks like you're fairly new to HN. Could you explain _why_ you're suggesting Scheme, suggest particular projects or things to read, etc.? It will be far, far more helpful for everyone involved than a _one-word_ answer.

Thanks.</comment></comment>


Show HN: Generate interactive heatmaps from your Google Location History data - <AUTHOR> http://theopolisme.github.io/location-history-visualizer/

<comment><USER2> This is really cool! For people who don't want to wait to upload their data, here are some annotated screenshots of interesting locations from my data (I had ~140 MB of it, accumulated over the last year):

[http://imgur.com/a/9H6vb](http://imgur.com/a/9H6vb)

It's amazing that I can zoom into a city that I've been to and nostalgically recount the story behind each location on the map. I can see this being a great storytelling aid that goes with your photo albums.

</comment><comment><USER3> Since I started being a digital nomad 10 months ago, people have wanted to hear more about my travels. I always wanted to start building something like this, because it's nicer than saying "Singapore for 4 weeks, Hong Kong for 2 weeks, Seoul for 9 weeks, ..." Just show them the map and they can learn whatever they want to! Thanks so much for building this and keeping it open source.

Will share images or data when I compile mine when I get the time.

</comment><comment><AUTHOR> I put together a little imgur album with some examples from my own Location History: [http://imgur.com/a/qLm1Q](http://imgur.com/a/qLm1Q) (I'm sure yours are much more interesting, though!)

 _location-history-visualizer_ is tool for visualizing your complete, consolidated, collected Google Location History. It works directly in your web browser – no software to download, no packages to install. Everyone deserves to know what data is being collected about them, without having to fiddle with cryptic pieces of software.

Would love to hear your thoughts!

<comment><USER4> Nice! :)

The only suggestion for improvement I can offer is to think through if it makes sense to "renormalize" the heatmap when I move the map or zoom the map. The current "normalization" has two for me unexpected effects:

a) My home and office is not colored "warmer" than many other places in my home town, although I bet I spend 90% of my time in those two places, and

b) I can see that I've been e.g. to Vienna, but when I zoom in I can't see anything - presumably because I've spent so little time there compared to my home town.

Some sort of "renormalization" of the heatmap would probably "fix"/change that.

<comment><USER5> added a pullrequest for that :)

</comment></comment></comment><comment><USER6> Here's mine - [http://imgur.com/a/gRiyk](http://imgur.com/a/gRiyk)

This is pretty awesome, but could definitely use persistent data so we can just share the map. Could also use off-client/background processing - might be working on this piece soon...

</comment><comment><USER7> Crashed several times, I have 250Mb of data which I think is unusually large for someone who pretty much only goes back and forth to my office and home. Either way from the screenshots looks really cool.

</comment><comment><USER8> This is awesome. I can even see where I'm usually stuck in traffic jam and where my train to work stops every day!

I had 50MB of data, and it took at least one minute to process the JSON file.

</comment><comment><USER9> I hope this isn't too dumb of a question but what's the best way to start collecting location history? Will it run down my iphone battery.

<comment><USER10> The Google app on the iPhone has the option of storing and reporting location history. You can enable it by Google App -> Settings (Gear icon on the top left) -> Privacy -> Location -> Location Reporting.

They claim to have optimized the app not to drain the battery life. I have been using it for over an year and I don't see an issue with my battery life.

</comment></comment><comment><USER11> Sweet, but you gotta make it possible to save the generated heat map somehow. It took around an hour to load my location data here.

</comment><comment><USER12> How much data do most people have? The page seems to be struggling to process my ~83MB.

<comment><USER13> I have 84 MB. When I uploaded the file in Chrome I got the Frozen Tab screen for a while, but then it went away and the page started showing me processing status.

</comment></comment><comment><USER14> You should enable zip file uploading.</comment>


Ask HN: What are the best company benefits at your company? - <AUTHOR> <comment><USER2> Sometimes functioning air conditioning :/</comment>


Mudge's identity was accidentally leaked by the WH - <AUTHOR> https://mobile.twitter.com/dotMudge/status/1234295430571315202 <comment><USER2> ... twenty years ago!</comment>


The Day our investors came to see the office (2011) - <AUTHOR> http://thedayseries.tumblr.com/post/963728807/the-day-our-investors-came-to-see-the-office <comment><USER3> This is exactly how I feel. The circumstances I live in are much worse than I could be the ones I could be living in (I'm currently living in the back of my Honda Civic, parking somewhere in Palo Alto or Redwood City), but I don't care. I've honestly never been happier. I'm doing what I love, building something I feel is sorely needed, and that's all that really matters.

I sleep better now on the air mattress in the trunk of my car now than I did working a mind-numbing job and sleeping in a king-sized bed.

<comment><USER4> How do you go to the toilets?

<comment><USER5> I'm not the Parent but if I'm ever a transient I'll hold onto my $30/mo 24-Hour Fitness membership for dear life. Toilets and hot showers all over the country.

</comment></comment></comment><comment><USER6> Wow I wrote this two years ago! I saw a few comments coming in this morning and had no idea what was going on. Gotta love Google Analytics :) I'm glad you enjoyed the story. I enjoyed the experience :)

<comment><USER7> Where are you now? How are things? Are you still happy?

<comment><USER8> From the bio:

signalgenius.com [founder & growing] fourthsegment.com [founded & failed] ryanangilly.com [blog] mypunchbowl.com [employee & still going] messagesling.com [founded & failed]

I'd really like to hear how things ended and if the relationship with the investors remained so positive all the way to the end.

</comment></comment></comment><comment><USER9> The story had the exact oposite ending as I was expecting given the lead-up.

<comment><USER10> Yea I find investors are not primarily concerned about my happiness - <USER2> how my happiness may effect the business.

It's not at all that they're heartless & they certainly don't want me to be unhappy. They just didn't give me money so that I would use it to have fun and be happy. Happiness is hopefully a side effect of a successful venture.

<comment><USER11> I even more expected that the investor was going to see the slightest bit of waver in his voice and use that as an excuse to yank all the money back.

<comment><USER10> I kinda expected him to say that the investor was his Dad or something.

I am pretty sure that if my company is not moving forward and the ROI is not looking good for investors - then they will not be first and foremost concerned with my happiness. They don't want me to feel miserable, but they certainly don't want to see me playing ping pong and drinking PBR all day if the company is not moving in a positive direction.

I think a better question an investor would ask would be "are you still feeling optimistic" or "are you happy with the direction we're going, our progress, etc" Not just am I personally feeling happiness

</comment></comment></comment></comment><comment><USER12> I ENVY your experience with your investors.

I had an experience with an angel investor, where she said: "You need my money, what's stopping me from just hiring some programmers from India and making what you have." I told her, "passion," and I walked away from the deal .

This taught me to take advice from others and NEVER deal with family. It also taught me that if my pitch is a website/app/service get my users and growth rate manageable, so leverage is in my favor.

<comment><USER13> Rather then walking away I would suggest telling the person they can try but it is unlikely because the cost of an actual good overseas programmer is comperable to here if you factor in the miscommunication, time difference, and the cost of the time to communicate exactly what is needed.

You might want to go back to the person, ask if they have had it built yet, and ask if they want to get started now but don't let this person take advantage of your passion.

<comment><USER14> If they've already tried the "I can hire an Indian." line, then they've already ended the relationship.

If you want to be cruel, you can point them to places like elance or rentacoder.

<comment><USER13> I was thinking it sounded more like a negotiating tactic to wrangle something more out of the relationship from someone who was emotionally involved wanting to move forward.

This happened to me, I couldn't do the project and didn't even start because the person wanted it done in 3 months. He went ahead and hired a firm in India. It took him 2 years and he didn't even start from scratch he bought a pre-built product to start from to save time. So I am very skeptical of when people say they are going to outsource something.

</comment></comment></comment></comment><comment><USER15> And this is why VC loves young people.

<comment><USER16> yep, because they are living a dream, and hope.

</comment></comment><comment><USER17> This sounds awful and I hope never to find myself in a situation where I am thankful for ugly living conditions, for that would mean I had become insensitive to the world.

<comment><USER18> They weren't dirty or unsafe conditions. They were just plain, leaving the team to focus on their well-being and their work.

I would find a really showy office somewhat distracting.

<comment><USER17> Without windows under office-quality fluorescent lights is bleak and awful. Sure, it's 'safe', but it drains the soul.

</comment></comment></comment><comment><USER19> I thought it was about making a very risky investment in a hope for a really high return.</comment>


Tell HN: Rejected from YC Core and Startup School - <AUTHOR> A little disappointing, but I'll continue working on my startup nevertheless. Stay strong, don't take a YC rejection personally and keep working on your startup anyway. A YC acceptance is not a requirement to succeed. <comment><USER2> Well said.

But lets break down what value YC offers:

Education: The Startup School videos are available publicly here: [http://bit.ly/YCVideos](http://bit.ly/YCVideos). You can schedule office hours with YC even if you are not part of YC on [https://blog.ycombinator.com/yc-open-office- hours/](https://blog.ycombinator.com/yc-open-office-hours/)

Investment: A YC allum last week told me that YC's investment is really not a good deal financially, and I think he's right given where we are (we've been through 2 accelerators)

Network: This is one of the aspects that's hard to replace, but reach out to your network (get [https://www.conspire.com/](https://www.conspire.com/) ). I managed to get a lot of advice from the above YC allum who I happened to work with in banking a few years back. And also help people out! You never know how it can come back, e.g. a guy at our co-working space I helped out with some electronics last year was the designer for the original Oculus Rift and put as in touch with one of the co-founders!

A YC badge for your startup: Again, hard to replace but it just means you have to be that much better at pitching and looking for angels/advisors who are in your space. Also read Venture Deals

YC makes a lot of mistakes and most of their startups fail, they have however got some big successes and that's what makes them attractive.

Hope this helps those that didn't get in

</comment><comment><USER3> Did you get your rejection email for Summer 2017 already?</comment>


Polhems Prize awarded to Daniel Stenberg for the creation of cURL - <AUTHOR> http://www.polhemspriset.se/aktuellt/arets-polhemspris-till-daniel-stenberg/ <comment><AUTHOR> Daniels response can be read here: [https://daniel.haxx.se/blog/2017/10/16/polhemspriset-2017](https://daniel.haxx.se/blog/2017/10/16/polhemspriset-2017)

English version(Google Translate) can be read here: [https://translate.google.com/translate?sl=auto&tl=en&js=y&pr...](https://translate.google.com/translate?sl=auto&tl=en&js=y&prev=_t&hl=en&ie=UTF-8&u=http%3A%2F%2Fwww.polhemspriset.se%2Faktuellt%2Farets- polhemspris-till-daniel-stenberg%2F&edit-text=&act=url)

Daniel is a true inspiration and well deserving of this prize, creating a tool being used by billions of devices each day.

For me as an occasional OSS maintainer/contributor, I am humbled to be able to stand on the shoulders of giants and will be forever thankful for him and others being early adaptors of OSS, paving the path for our now thriving community.

</comment><comment><USER2> > Further, I realize that this award might bring some additional eyes on me > who will watch how I act and behave. I intend to keep trying to do the right > thing and act properly in every situation and I know my friends and > community will help me stand straight – no matter how the winds blow.

That's a great attitude.

</comment><comment><USER3> Hearing Stenberg talk about cURL as a "hobby project with a billion users" made me ashamed at how quickly impatient or reluctant I am to help maintain open-source work: [https://daniel.haxx.se/blog/2015/09/17/blabbed-about-curl- at...](https://daniel.haxx.se/blog/2015/09/17/blabbed-about-curl-at-google/)

</comment><comment><USER4> I'm curious: what made cURL succeed?

I remember wget being the hotness back in the day. When I encountered cURL I thought it was a variant of wget.

<comment><USER5> I think it was you could use it a library more easily.

Curl is MIT licensed, so less to worry about if integrating in your code base. I also think it was designed as a library from the beginning, while wget was intended solely as a command line utility. Wget is also GPL licensed, so does not mix super well with proprietary programs or if you just don't want to "taint" your codebase with GPL for other reasons.

</comment></comment><comment><USER6> [https://en.wikipedia.org/wiki/Polhem_Prize](https://en.wikipedia.org/wiki/Polhem_Prize)

An explanation of what the Polhem Prize (Polhem's Priset) is, for those who don't read Swedish.

</comment><comment><USER7> I find it quite bizarre that they make almost no attempt at explaining what cURL is. If you didn't already know, you would have no idea even after reading the announcement.

</comment><comment><USER8> -O</comment>


Google Caught Stealing - <AUTHOR> http://www.pcworld.com/article/id,130502-c,copyright/article.html <comment><USER2> ah this reminded me of an incident when a prof joked ..... A wrong answer is always unique :D If it shows up in many papers then it either means you all copied or my answer manual is wrong

<comment><USER3> Not so. On a couple programming assignments I've graded, some particular wrong output has been more common than the correct one.</comment></comment>


Mountain View moves forward with 9,100-unit housing option next to Google - <AUTHOR> http://www.bizjournals.com/sanfrancisco/blog/techflash/2015/11/9100-housing-units-google-lnkd-intu-msft-goog.html <comment><USER4> Local elections matter. You can make real impact.

'A quick backstory: More than a year ago, a previous city council approved a plan for the North Bayshore that allowed up to 3.4 million square feet of net- new office space, but no housing. That stirred passions from housing advocates who said approving such massive job growth without adding nearby housing aggravated the Bay Area's commute patterns and encouraged suburban sprawl... Voters agreed, and a pro-housing council majority was voted into office last November' [http://www.bizjournals.com/sanjose/news/2014/11/06/mountain-...](http://www.bizjournals.com/sanjose/news/2014/11/06/mountain- view-council-election-results-could-mean.html?page=all)

<comment><USER5> It's a start but bay area cities and towns need to realize that as industry and jobs and income grow they will have to grow too (or face increasing housing shortages). This is not the 50s and 60's leafy suburbs anymore. It's an agglomeration and needs to build up --at least along the Camino Real. Allow high density housing and build rapid transit. Allow mixed use development.

<comment><USER6> True, they need to more than just build housing -- if they want people to get out of their cars and on transit and bikes, they need to build first-class Bike and Pedestrian facilities.

Too often think that all they need to do is build housing and collect property taxes and their job is done, and they ignore the fact that most of the residents are continuing to drive everywhere.

<comment><USER7> I agree, but I think some densification will help increase demand for that, especially for biking/pedestrian infrastructure. Even in famously bike- friendly cities like Amsterdam and Copenhagen, biking is mostly a medium- distance thing: the vast majority of bike commuters live in the range of 1-5 miles from work, not 15. So getting a lot of people living within 5 miles of their office is a precondition for having a significant portion of people even interested in the existence of bicycle infrastructure. One way to do that given the current Valley layout is to really densify the axis from Mountain View to Palo Alto. (Unfortunately, I suspect Palo Alto is not going to be _at all_ on board with that.)

<comment><USER6> I thought so too when I moved to a "transit oriented development" area near Caltrain. 2 years later there have been zero bike and pedestrian improvements, and things have gotten even worse when construction has closed one sidewalk and blocked a bike lane and new construction has blocked the safest path to the nearby Caltrain station -- plus, construction workers have placed their "No Parking" signs in the middle of the sidewalk, and calls to the city have not changed that.

</comment></comment></comment></comment></comment><comment><USER8> Once upon a tech TechCrunch did an amazing write-up on San Fran housing issues. One of my favorite points was the following cascaded issue caused my rent control.

1) Rent control keeps rent prices down 2) This leads to matching controlled property tax 3) This incentivizes small cities to prefer uncontrolled commercial zoning over controlled residential. 4) Which means smaller cities have way too much commercial space and not nearly enough residental.

Oh what a tangled web we weave when we practice to artificially constrain rents. Wait. I think I did that wrong. Ah well. Close enough!

<comment><USER9> Devil's advocate: you think your landlord should be allowed to double your rent at the end of your lease? (If they can choose to not continue the lease and evict you, I guess it's the same thing.) In Ontario, for example, there is essentially an inflation-adjusted rate that landlords are allowed to increase their rent by every year ([http://www.landlordselfhelp.com/RentIncreaseGuideline.htm](http://www.landlordselfhelp.com/RentIncreaseGuideline.htm)) _without prior approval_. I'm sure there are many flavours of rent control, tilting either towards landlords or tenants.

<comment><USER8> Of course I do. You had a lease for a negotiated price for a year. That year ended. Now you can negotiate a new price based on current market conditions.

A co-worker got tired of moving every year due several years in a row of homeowners wanted to sell their house when his lease ended. So he asked to sign a two year lease. The homeowner said no. Then he offered an extra $200 a month and two years. And the homeowner said yes. Voila!

I work at a small company (<20) and we're looking for new office space. For some locations we can lock-in a pretty good price if we're willing to sign a 5-year lease.

<comment><USER10> That would allow a really dangerous behavior: the landlords would put flats under the market price, in order to get new tenants, and after one year living there (furniture bought, new friends, school for the children, etc.) the landlords would be able to rise the fee as much as they want.

The situations where there's an asymmetrical negotiation like landlords- tenants or employer-employee must be regulated by law in order to make them fair.

Law, not wealth, should give rights the people.

<comment><USER11> Much of the US lives just fine without rent control. My landlord raises rents every year, in lockstep with local union raises. Doubling rent annually is hyperbole, and if you really think landlords can afford to pull bait & switch leases, local only movers cheap enough that clever people should exploit them by moving every year for the discount rent.

At this point it seems like the only places with rent control are where rents are refucking-diculus.

<comment><USER12> Doubling annually probably happens rarely enough you can ignore it. Where I live now, though, in a medium-sized Pacific NW city, rents in various of my friends and relations buildings/complexes have seen increases 50% in four years.

That's still pretty bad, and I know several people myself who were forced out due to rising rents becoming unaffordable.

That kind of disruption to people's lives doesn't make the kind of society I want to live in.

</comment></comment></comment></comment></comment></comment><comment><USER13> Mountain View currently has 75,000 residents. It will be interesting to see if all these new voters kick off a pro-housing virtuous cycle.

Something similar happened in Loudoun County, VA circa 2000-2007.

<comment><USER14> That certainly would be nice- but another possibility is pull-the-ladder-up- behind-you NIMBY-ism.

<comment><USER15> If the new units are primarily owner-occupied, NIMBY-ism is a risk. If the new units' residents are renters on 1-year leases, they would probably vote for ever increasing supply.

<comment><USER16> Yes, this. I've often thought that in terms of long-term strategy, pro-housing groups should focus on getting rental housing built, and leave owner-occupied condos alone.

</comment></comment></comment></comment><comment><USER17> This is great news, but they really need more than 9k units up there, especially as they'll continue to add more office space. Now that there's a pro-housing city council, I wonder if some of the existing low-density office buildings could be redeveloped to be taller and mixed-use.

</comment><comment><USER18> One of the biggest reasons I'm hesitant to move to the valley is the housing situation, things like this are great to hear.

<comment><USER19> This is not going to make a dent in prices. It would take developments of similar scale in every municipality in the region to begin to address the problem.

</comment></comment><comment><USER20> The article isn't quite as positive as the headline makes it sound - <USER2> includes the statement that "it's not all going to be built."

But it's still good.

</comment><comment><USER21> Finally! Somebody did the sensible move of adding more housings in urban areas.

</comment><comment><USER22> Good. Building up is the way to go. Here in Melbourne, >30-story apartment towers have become the norm, and it's succeeded in slowing the rise of housing prices in the inner city quite a bit. I also think it's helping to delay our transportation crisis.

<comment><USER23> Too bad there are no minimum size restrictions and all apartments in those 30-story towers are essentially shoe boxes.

<comment><USER24> If people are buying them, then they're obviously OK with that trade-off.

<comment><USER25> Many are bought without inspection and are not lived in. Some of the large apartment buildings in the north of the CBD and Docklands are largely empty while being completely sold.

</comment></comment></comment></comment><comment><USER26> That is incomprehensibly dense. 500-acres is .78-square-miles and to drop 9,000 people in there would be like living in Tokyo.

The largest cities in the world by land area, population and density:

[http://www.citymayors.com/statistics/largest-cities- density-...](http://www.citymayors.com/statistics/largest-cities- density-125.html)

<comment><USER27> Not necessarily. For individuals who want to live close to work and rent condos/apartments it could work out well (e.g. young professionals just out of college). For example, West Hollywood is ranked as the most walkable city in California (by Walkscore), has a population density of ~19000 people/sqmi, is ~60% individual households, and ~80% of the housing is rented.

</comment></comment><comment><USER28> As a Mnt View resident myself, I strongly applaud this, but am disappointed that families got the short end. I get that the media age at Google is low, but I bet that a short commute is disproportionately important to parents.

<comment><USER29> How have families received the short end?

Having more units for singles/couples will lower the pressure on 3BR+ apartments; I know a few people staying in large apartments in SF as it's the most rational decision to minimize rent on a per-tenant basis.

<comment><USER28> That is certainly true, but it's not clear to me if that effect is better than just creating [some] 3BR+ apartments as part of this. Regardless, there's no debate that this development is a good thing overall.

</comment></comment></comment><comment><USER30> Given Google's audacious projects, I expect housing designs similar to classic SimCity arcologies: [http://imgur.com/4k7csZg](http://imgur.com/4k7csZg)

</comment><comment><USER31> Sounds like a huge win for the Bay Area. Now just rinse and repeat about 100 times ...

</comment><comment><USER32> How are they going to build on Google's land? Will Google own the housing?

<comment><USER33> I don't think this is a Google's land. This (better) article has a map which shows it being along Shoreline blvd: [http://www.mv- voice.com/news/2015/11/11/city-opts-to-max-out...](http://www.mv- voice.com/news/2015/11/11/city-opts-to-max-out-housing-in-north-bayshore- study)

<comment><USER34> Most of that main pink area is existing Google buildings. Regardless - <USER3> in that area will be _awesome_. (There are quite a few other companies with buildings in the same area, dotted in with the google buildings.) Add some nearby grocery and shopping capabilities, and the planned improvements for biking in the area, ... huge improvement to the traffic and automotive pollution situation.

</comment></comment></comment><comment><USER35> "Access To Website Blocked"

Maybe because I'm using an ads blocker?

</comment><comment><USER36> What does "pro-housing" mean? Isn't everyone who lives in a house pro-housing?

<comment><USER37> It means "pro-new-housing" generally. So someone who lives in a house they own in a desirable neighborhood that other people would like to build in would not be "pro-housing" by that colloquial definition.

</comment></comment><comment><USER38> Dorms next to the trailer park. Figures.

Maybe they could also take over the Microsoft buildings next to the bus yard. Microsoft cut staff at that location a few years ago.</comment>


Gamifying mathematics (an interactive tutorial for sequent calculus) - <AUTHOR> http://logitext.ezyang.scripts.mit.edu/logitext.fcgi/tutorial? <comment><USER2> The linked book by Pierce is pretty fantastic as well. <http://www.cis.upenn.edu/~bcpierce/sf/>

</comment><comment><USER3> I've been working on a similar project for high school algebra. Mine isn't as far along, so it's been nice to see some validation on my ideas, as well as get some thoughts on how I would improve.

</comment><comment><USER4> How do you make contraction happen? I don't see a button for it.

<comment><AUTHOR> We do contraction on implication-left automatically, and only have it as an option for forall-left and exists-right, since it's not a useful notion for the other operators.</comment></comment>


After a spectacular crash, Bitcoin makes a surprising comeback - <AUTHOR> http://www.economist.com/node/21563752?fsrc=scn/tw/te/pe/monetaristsanonymous

<comment><USER2> This article is surprisingly good. I like the mention of Bitcoin being the "world's first" decentralized digital currency. This is a clear way to convey to the reader that Bitcoin very is different from everything else. I use the same term in my Bitcoin introduction: <http://blog.zorinaq.com/?e=66>

The Economist author only made one error: Bitcoin is not the only decentralized digital currency. Some forks exist (eg. Litecoin), although they have very little traction currently; see the Alternate Cryptocurrency board: <https://bitcointalk.org/index.php?board=67.0>

<comment><USER3> Correct me if I'm wrong, but aren't the others just merely clones of the original Bitcoin, using the same source code? I would still call Bitcoin the only currency, as it's the base they all share.

<comment><USER4> In this case, multiple currencies can share the same code base, in the same way The pound and the dollar share most of th same rules Of fiat currency.

</comment></comment></comment><comment><USER5> Are there any digital wallets out there that are: 1) trustworthy 2) allow easy funding (credit/debit card/paypal)

Until that's the case I just don't see this taking off. I'm fairly motivated to buy a few just for kicks, but if I can't be bothered I can't see the general population doing so either.

I see MtGox takes wire transfers, which is almost good enough, but not quite. Didn't they also suffer a breach not so long ago?

<comment><USER6> I used MtGox a month ago to see what all the bitcoin fuss was about and their UK bank was inexplicably closed during that time. They've been contacting me with updates via email but the money I wired to them still hasn't been credited to my MtGox account which is really frustrating.

<comment><USER7> Have you bothered to contact them yourself?

<comment><USER6> Yes, I've contacted all three parties, just waiting for some kind of resolution which they claim will be in roughly 2 weeks.

</comment></comment></comment></comment><comment><USER8> This statement from the last paragraph of the very interesting Economist magazine article submitted here is thought-provoking: "Bitcoins tend not to be very secure, says Richard Booth, a consultant at RSA, a cyber-security firm. As some users have found to their cost, hackers can sometimes steal Bitcoins from users' online vaults. In the latest raid, on September 5th, hackers stole $250,000 in Bitcoins from Bitfloor, a large American exchange, causing it to shut down its operation." What does that say about the overall reliability of Bitcoins as a new form of currency?

A while ago I wrote that perhaps the greatest contribution the Bitcoin experiment will make to humankind is to teach you and me and our neighbors more about the realities of economics. And later I added that the Bitcoin experiment will also contribute to greater understanding of attack surfaces and online crime. Many of the ideas about how to mine Bitcoins, store Bitcoins, and trade with Bitcoins as a medium of exchange illustrate both the strengths and weaknesses of any other medium of exchange in a world full of human beings. Seeing the discussion of Bitcoins here on Hacker News reminds me of early online discussions in the 1990s of online payment systems such as PayPal, and the arguments beforehand that PayPal wouldn't have to invest a lot of time and effort (as it eventually did) building defenses against theft and fraud. If a weakness in a system is attached to a lot of money, the way to bet is to bet that someone will go looking for that weakness, even if you haven't thought of it.

AFTER EDIT: Here is a question for all the security-knowledgeable persons who participate here on Hacker News, a question once asked of the inventor of Pretty Good Privacy (PGP). How expensive do you think it would be for the United States National Security Agency (or a comparable organization from another national government) to crack a Bitcoin store, given that we know that some Bitcoin caches have already been cracked?

<comment><USER9> I'm a bitcoin skeptic, but I think that the problems you mentioned in the first paragraph have more to do with the poor security of those individual vaults, not bitcoin itself.

But, it does bring up an interesting point: as far as how I know bitcoin works, once you steal the bitcoins, they're stolen. This is different from fiat currency, at least online. If someone breaks into Bank of America's servers and figures out how to transfer a bunch of money from other people's accounts to their own, Bank of American can undo it. As long as the person does not get a cash or cash-equivalent, then it should be reversible. I invite the people who are more familiar with bitcoin to correct me, but as I understand the protocol behind it, once a bitcoin transfer from one owner to another owner is made, it's not (forcibly) reversible.

<comment><USER10> Exactly. Bitcoin transfers are irreversible. Which means, effectively, they are closer to physical money than electronic balances in this respect.

</comment></comment></comment><comment><USER11> Estimated around the end of this year, the amount of Bitcoins mined per day will be halved according to the schedule. If I understand correctly, this means that the cost to mine one BTC will double, roughly, if the mining capacity stays the same.

On top of that, some companies are, or should be coming out with ASIC-based miners, which are orders of magnitude faster in mining bitcoins than GPU's, at lower energy usage, increasing the total mining capacity.

Does the cost of mining one BTC influence the price of one BTC? Will these events have an influence on the price (if they were not already 'priced in')?

<comment><USER12> I can answer the last question easily. If the supply of bitcoins rises faster than the real value of the debt they represent, their nominal value against the dollar will fall.

<comment><USER13> Except that this generation rate halving in price is a predictable, known event, and therefore already factored into the price of BTC.

<comment><USER12> If you assume efficient markets, yes. Nothing I've seen about the bitcoin market so far would suggest that it's efficient. Low volume, ideological motivations, unstable technologies, few really safe places to store value, etc.

<comment><USER13> Oh, safely storing value isn't a problem: bitaddress.org.

Safely storing value while keeping it liquid, there's a problem.

</comment></comment></comment></comment></comment><comment><USER14> While I'm rather ambivalent on Bitcoin, I feel the article should show _transaction volume_ as well, in order for us to make an informed assessment on its future prospects.

Displaying a prominent graph of only BTC/USD as proof of recovery, without an indication of liquidity and total market size, seems insufficient.

<comment><USER2> You can see the volume (and exchange rate) on the largest USD/BTC exchange (MtGox) here combined on one graph: [http://bitcoincharts.com/charts/mtgoxUSD#czsg2011-01-01zeg20...](http://bitcoincharts.com/charts/mtgoxUSD#czsg2011-01-01zeg2012-10-04ztgSzm1g10zm2g25zv)

But a better indicator that Bitcoin activity is increasing is the number of Bitcoin transactions on the network itself. Bunch of interesting charts here: <http://blockchain.info/charts> Especially: [http://blockchain.info/charts/n-transactions-excluding- popul...](http://blockchain.info/charts/n-transactions-excluding-popular) showing the # of transactions has tripled in the last 4 months.

<comment><USER15>
      But a better indicator that Bitcoin activity is
      increasing is the number of Bitcoin transactions on
      the network itself.

Is it better? If I shifted some bitcoins around between several of my own wallets, that would create transactions - but would that be a meaningful indication of anything?

<comment><USER16> I wonder how we determine similar 'activity' as far as normal currencies are concerned? Either it's related to money moving between accounts, or it's related to volumes on an exchange, or something else entirely, but surely _those_ values are just as easily 'manipulated' as any of BTC.

Admittedly the volumes themselves dictate that me moving money from one bank account to another will have less of an impact on the final number, but then again, I'm always moving money between my different bank accounts, but never between my Bitcoin addresses. I obviously can't say for certain, but I don't think there's a meaningful number of users moving BTC between their wallets for no reason.

</comment></comment></comment></comment><comment><USER17> All this tells me is that it hasn't hit governmental radar in any meaningful way, yet.

If Bitcoin was annoying enough to be a real problem to the powers that be, the computing resources necessary to hijack the main chain would be online in a very short period of time.

<comment><USER18> Would you mind describing that attack in a bit more detail?

<comment><USER19> Bitcoin uses a proof of work system to determine the valid chain of transactions, as well as who gets the initial currency payout. Basically, anyone who controls more than 50% of the CPU power in the Bitcoin network can control the currency.

If you want more details, I'd recommend reading the Bitcoin paper: <http://bitcoin.org/bitcoin.pdf>

Some of the various forks have tried to work around this by having trusted nodes and the like, but then you lose the decentralized nature and are vulnerable to the trusted nodes going rogue.

<comment><USER20> Having greater than 50% of the computing power of the bitcoin network does not give you complete power of the currency. You would be able to prevent transactions from occurring, and double-spend recent transactions. Since the bitcoin network is effectively the most powerful supercomputer in the world, this would be a very expensive attack to sustain, without that large of a payoff.

I definitely wouldn't recommend starting with the official bitcoin paper to learn about this. That would be like telling a math student to just read Newton if they want to learn Calculus :). Check out the bitcoin wiki instead: [https://en.bitcoin.it/wiki/Weaknesses#Attacker_has_a_lot_of_...](https://en.bitcoin.it/wiki/Weaknesses#Attacker_has_a_lot_of_computing_power)

<comment><USER21> FWIW, when I was figuring out Bitcoin I avoided the paper at first (due to logic similar to yours) but eventually read it because there was a lot of noise in the wiki, etc (may have changed). I found it surprisingly accessible; more so than the vast majority of academic papers I've come across (I have most of an EE degree but little to no formal CS training).

</comment></comment></comment></comment></comment><comment><USER22> I've seen some time ago comparison of popularity of passing fads and useful inventions.

Useful invention graph looked like this [http://3.bp.blogspot.com/_2IAWpIwOiOc/SuvD_xiOfTI/AAAAAAAAAD...](http://3.bp.blogspot.com/_2IAWpIwOiOc/SuvD_xiOfTI/AAAAAAAAADQ/9xFahAt33wE/s400/marketing+fad+graph.gif) (example was IT) and graph for the passing fad dropped down to almost zero after initial peak (example was Macarena dance, if you remember that you are old ;-) ).

So far bitcoin seems like useful invention.

<comment><USER23> I'm old enough to have thought at the time of the Macarena that it was a fad.

<comment><USER24> No one here has attended a wedding or bar mitzvah? That silly dance is far from dead, which is not all that important depending on your social set but does give some doubt on the analysis.

</comment></comment></comment><comment><USER25> It took me about 5 days to sync a new Bitcoin wallet. Until they fix this problem Bitcoin can never be a serious player.

<comment><USER26> It always seemed odd to me that the protocol expects everyone to always have the full blockchain (currently over 2 GB of data). The response is always "when it becomes a problem we'll fix it", but isn't it already a problem for mobile use etc? The other problem I never see mentioned is the slow speed in getting transactions confirmed (for me it takes maybe 30 minutes)

<comment><USER27> The original bitcoin paper described a "Simplified Payment Verification" which doesn't require the full blockchain. This is used by Bitcoin Wallet for android.

Another alternative is to work with a trusted server. This is used by Bitcoin Spinner for Android.

</comment></comment></comment><comment><USER28> I'm curious if this last sentence from the article is true:

      > It turns out that a currency can thrive even when
      > no one is making laws for it.

Were the laws were so weak or hard to enforce at one time that, effectively, there were no laws? Can we look at currencies from that period of time to give us a sense of how bitcoin will work?

(Another poster pointed out that the spec is making the rules, and not a government, so it may be wrong to compare bitcoin with an un/poorly regulated currency.)

<comment><USER29> Gold? (even today)

<comment><USER30> But gold is shiny and solid and bitcoiny teeth implants haven't quite the appeal.

</comment></comment></comment><comment><USER31> Someone in the comment section of the article linked to a fascinating chart: [http://24.media.tumblr.com/tumblr_mb77t0ygoF1qfrvjzo1_1280.p...](http://24.media.tumblr.com/tumblr_mb77t0ygoF1qfrvjzo1_1280.png)

It shows bit-coin value to USD, gold, silver, and crude. It's fairly stable against the commodities but drastically spikes in value against the dollar. Our Fed at work...

<comment><USER32> So bitcoins are a commodity like unto gold, silver and crude, and behave the same way. Cool, but for practical use as a currency it would be better if they were correlated with USD/EUR/JPY, food, labour and other things that normal people want to buy.

</comment></comment><comment><USER33> Better tag line: Bitcoin is the world's most ingenious botnet monetization scheme.

</comment><comment><USER34> Ahem: [http://en.wikipedia.org/wiki/File:Gartner_Hype_Cycle_for_Eme...](http://en.wikipedia.org/wiki/File:Gartner_Hype_Cycle_for_Emerging_Technologies.gif)

<comment><USER35> Bitcoin has already gone through two massive crashes like that. Still kicking.

</comment></comment><comment><USER36> Surprising? What's surprising about it? That there's no _governmental_ issuing authority? (It is not true that there is "no issuing authority whatsoever", the issuing authority is the spec.)

This won't surprise anyone with a grasp of economic history that extends beyond 1945.

<comment><USER37> Is it not surprising that a (almost purely) speculative commodity traded by very few people overall recovers that fast from a major crash?

<comment><USER2> No, it is not surprising. If you look at the Bitcoin forums to understand the community, it is very clear that a large core of users are really here for the long term. They truly believe in the concept of a decentralized digital currency.

This core group of users (including me) were completely unswayed by the crash of 2011 H2. We all knew that it was nothing more than a correction of the insane valuation bubble of earlier that year.

<comment><USER38> And I think this is the actual problem with Bitcoin, the community is small and few people are owners of Bitcoins.

How many people sold all their Bitcoins in the wake of that crash? It is indeed unsurprising to me too that Bitcoin recovered after a crash, because the owners of Bitcoin believe in it and so the market kept being rational post-crash.

The real test of Bitcoin has yet to happen, when Bitcoin will be popular enough that regular folks will put their life savings into it.

<comment><USER39> That test is unlikely to happen. regular folks do not put their life savings into currencies or commodities. They put their life savings into banks. A saving account in a bank does not contain a heap of cash or gold nuggets. Instead its an trust relationship between the bank and the bank customer, like a contract.

I would guess that in "the future", the name of currencies will become less likely to end up in the mindset of the general public. All they know is that a specific thing (a computer, a car, and so on) will cost X amount of what they have in the bank.

<comment><USER40> _Regular folks do not put their life savings into currencies or commodities. They put their life savings into banks._

What planet are you from? On my planet, regular folks put their savings into 401k accounts, which invest in stocks, bonds, and sometimes commodities. If you do choose to keep your savings in a bank, you're investing in a currency (probably the US dollar.)

 _Instead its an trust relationship between the bank and the bank customer, like a contract._

Nope. Actually it's a trust relationship between the federal government, which insures your account up to 250,000 through FDIC, and you. You also have to trust that the federal government isn't going to inflate away your savings (spoiler alert: they are going to.)

<comment><USER39> I guess it depend on where on the planet one is (or maybe its on the not-the- usa-planet). I am not sure banks where I live even have anything called 401k plans. They do have stocks and bonds, but its not something commonly talked about. pension savings are done mostly through tax but in rare occasions, addition money is added by the place you work from. In very extreme rare occasions, people sometimes add personal savings to it.

<comment><USER40> Even if the government manages your pension funds, they're still going to be invested in stocks and bonds, ultimately.

Having a savings account is just about the dumbest thing you could do right now, since the rates are essentially 0%: [http://articles.boston.com/2012-10-01/business/34178552_1_in...](http://articles.boston.com/2012-10-01/business/34178552_1_interest- rates-low-rates-average-interest)

Yet they still have the audacity to ask me if I want to open one every time I visit the bank. It must be hard keeping a straight face.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER41> I'm wondering, what if government bans using of Bitcoin (or such a digital currency in general)? Not that it will try to block it just that it will be illegal to use it (i.e. for companies to receive Bitcoins). Will it still be used and/or useful?

<comment><USER42> You can make bitcoin a legitimate payment mechanism. Despite the advertised anonymity it's fairly easy to track down a particular identity from the web of transactions. If people moved on mass into bitcoin it would make their financial history pretty impossible to hide.

<comment><USER41> I hope that would be the case :)

</comment></comment></comment><comment><USER43> One thing that I wonder about with respect to Bitcoin is the issue of taxation. Governments can support the dominance of their currency within their borders by compelling their citizens to pay taxes in the national currency.

And on the "supply-side", in the US at least, federal spending is a significant portion of GDP, so you will always have a large amount of dollars floating around being used as a means of credit, exchange, and value.

And finally, having control of interest rates is a powerful tool to support economic growth - I would be fearful of a world where policymakers did not have that ability.

</comment><comment><USER44> FTA: "On the website Silk Road, a sort of eBay for drugs hidden in a dark corner of the web known as Tor[...]"

Tor isnt a dark corner of the web...</comment>


Ask HN: How do you best leverage job enquiries and keep your current job? - <AUTHOR>

I get about 2 to 3 job enquiries a week from both recruiters and actual hiring managers. These positions are always step-up positions with salaries 20-30k higher than what I make right now. The "problem" is that I absolutely love my current company and have no plans to leave them.<p>I'm wondering if there's some way I can leverage these enquiries to potentially bring my salary up a bit? I'm sitting in the 40th percentile right now for my job in my area. Thanks! <comment><USER2> First, if you are at the 40th percentile for pay (and you are not a 40th percentile worker), even without the other potential job offers, you should have a conversation about increasing your salary. Have you gotten any raises or promotions? If not, or even if you have, you have a case to ask for more. Most companies like to stay in the 3-5% range for typical raises, but if you are under market but are a great employee they want to keep, they can usually go higher, maybe 10%.

If you are a little more cutthroat, and have an appetite for risk, you can try the following technique. I have personally used this technique to get raises as high as 21% and 27% from an existing employer. It involves applying for one of these jobs and getting an offer letter in hand, taking that to your current employer and having them match or beat it. You have to be prepared to walk away from your current company if this goes wrong, and you can only do it once at that company. Compared to the more civil way described earlier (which will max out at 10%), this way can get you 20-30%. The risk is that your current employer will refuse to play ball and call your bluff about wanting to leave. Or they may give you the money and try to get rid of you later. If this happens, you will at least have a higher salary to start negotiations when you start searching again.

The first time I tried this back when I was a PHP developer making $55k back in 2009. I got a raise to $58k, but I thought I deserved more. I got a job offer for $65k and took it to my employer who matched, but the new job was 20 miles closer to home and had half day Fridays, so I thought my current employer needed to beat the offer. I told the new job I was conflicted, and they increased their offer to $70k, which I accepted. You have to be willing to walk away if you play the counteroffer game.

<comment><USER3> >You have to be willing to walk away if you play the counteroffer game.

This is great advice. Not just for salary negotations. This advice also holds for relationships. You ALWAYS have the option to simply walk away. Why stay in a toxic relationship when you can just ... walk away?

</comment></comment><comment><USER4> As a manager, I want people to be happy with their compensation. But an inquiry is not an offer, and furthermore it's for a job you're not interested in. To get leverage, as byoung2 writes, you need an offer from a job you'd actually take (your BATNA). Or you need to be able to quantify your value to the company. That is a skill that pays off.

I recommend patio11's negotiation guide: [http://www.kalzumeus.com/2012/01/23/salary- negotiation/](http://www.kalzumeus.com/2012/01/23/salary-negotiation/)

Also, the book _Getting To Yes_ , which will be at your local library. It's all about win/win negotiation.

Finally, don't forget to do a holistic compensation comparison, unless you're a non-benefited contractor. People frequently forget that average hours per week, one of the biggest differentiators, will not be in your offer letter (unless it talks of paid overtime).</comment>


Ask HN: Do you feel tired/exhausted after long deep hours of coding? - <AUTHOR> How do you cope after long deep hours(usually 3-5 hours) of coding which requires to solve any problem. I get exhausted and I can not able work after this deep cycle. My attention span get reduce.<p>After one session I can not work on anything else which requires too much focus (work, side projects). What can I do? <comment><USER2> I've been working as a programmer for over 20 years. I started my experience when the first computer arrived at my house; an x86 (286 actually) without protected memory meaning I had to code in text files and then open the IDE and compile there or command line compile within DOS. It sucked having to switch in and out of an IDE. But it taught me persistence and the ability to keep going to solve the problem. I would work late into the night before responsibilities forced me to go home to attend to first a girlfriend, then wife, then little ones. Life is about choices. You can only control your choices and nothing and no one else. What is your goal? Your desires? Your fears? If you honestly ask yourself these questions and struggle with the answer, when it comes to you it will be a wonderful moment in your life. If coding comes naturally and you enjoy it and you feed your brain sufficiently good quality food (ok a little junk food) you should be able to sustain multiple sessions of coding in one 16 hour period - but take breaks. You also should look at your sleep habits. With less than 8 hours personally I see and feel the slowdown. My brain is unable to process at full speed. You should limit coffee for when absolutely necessary. Over time your response will reduce and you will be an absolute zombie when off the coffee - not to mention the headaches, etc. So give it a try and see how your brain performs.

<comment><USER3> The 286 did have protected memory.

Each memory access was associated with a segment register, one of CS DS ES SS. The low 2 bits were for 4 permission levels, and the next bit up indicated which of two tables the MMU should use, the LDT or GDT. The high 13 bits were an index into that table, which contained 8-byte structs called descriptors.

Each descriptor had a 24-bit base and a 16-bit limit. The base would remap memory. The limit would cause an access denial for out-of-range addresses. There were also permission bits, including no-execute.

That MMU was used by Xenix, Windows 2, OS/2 1, RMX, and various DOS extenders. Some of those weren't very serious about controlling permissions or remapping memory, but the hardware could do it.

Despite your forgetfulness, you seem like you might qualify for a job at my place. Hacking up doskey is excellent. Here, take a look: [https://news.ycombinator.com/item?id=20328264](https://news.ycombinator.com/item?id=20328264)

</comment></comment><comment><USER2> one addition: Coding is the expression of work done in your head. The expression of a solution you slept on and solved in your sleep. The current way to get information from your head and into the computer. If you are coding straight 3-5 hours, I'd ask can you automate something? Spend some time thinking about the problem you are trying to solve, draw something, then code it to get it out of your head.</comment>