Show HN: An NES emulator written in Rust - <AUTHOR> https://github.com/pcwalton/sprocketnes <comment><USER2> Note that this project includes a makefile, though Rust will be moving away from make and friends entirely once the new rustpkg tool is merged:

<https://github.com/mozilla/rust/pull/4610>

Independence from external build tools is one of the coolest features of Go, so I'm really excited about seeing more languages take this route.

<comment><USER3> Oh, that's really cool, I didn't know they had this project in the pipe. I agree that bundling tools with the compiler is such a great idea; a build tool built specifically for the language can assume so much more and do so much more, it's a net win.

</comment></comment><comment><USER4> It was fun watching @pcwalton get it working in such a short time.. from the first signs of life[1] to something we all recognize[2].

      [1]: https://twitter.com/pcwalton/status/298134945531035648
      [2]: https://twitter.com/pcwalton/status/299401519890042880

</comment><comment><USER5> LOVE seeing stuff about Rust.

I'm at a junction where I've been using Scala happily, but it falls down for numerical work because it can't call C libraries using large arrays without copying, because of the different memory layout used by the JVM vs. C, which really hurts for large data.

<comment><USER6> I'm also a Scala fan looking fowards to Rust. Have you tried Go? I really like it too.

<comment><USER5> I haven't tried it, but I've heard good things about the experience and the performance. It didn't seem very functional though when I first looked at it which is what I was interested in at the time.

There's something to be said though for being able to write programs that will already be doing real work before the pinky finger has released the return key that launched them, I like the _feel_ of that and I've missed that with the JVM.

</comment></comment></comment><comment><USER7> So... how much of the NES does this emulate? As I understand it, it's pretty easy to get a basic 6502 core and a scanline renderer together enough to handle, say, Super Mario Bros. but if you support all the timing corner-cases and memory-map chips and such, it gets to be pretty frustratingly complicated.

EDIT: I should have looked more closely; looking into 'mapper.rs' reveals that it currently supports only the vanilla NES memory-map.

<comment><AUTHOR> It's very early. You're right that it supports only the very basic functionality.

</comment></comment><comment><USER8> @pcwalton

Thanks! quite interesting use case for Rust.

May I ask you - was it your side project or did you actually work on this at the office?

<comment><AUTHOR> It's a side project.

<comment><USER3> Next step, rewrite Firefox in 6502 assembly, and run it in your NES emulator!

</comment></comment></comment><comment><USER9> Looks pretty clean and concise, yet reasonably readable. Cool to see this kinds of language demos.

<comment><USER2> Concise indeed, only around 2,000 lines for the whole thing. Though I'm not sure if it's possible to quantify the accuracy of the emulation.

</comment></comment><comment><USER10> This is cool and all, but...

Since when does an NES take "decent processing power" to emulate? I emulated NES games on a 386DX40 and SNES games on a 486DX266. Certainly the emulation wasn't as accurate as what you get today, but neither is this tech-demo example.

<comment><USER3> I guess it depends on how closely you want to emulate the platform. For example, there was a great article [1] about a SNES emulator that required an extremely powerful machine, because it aimed to be a 100% accurate emulator. I guess if pcwalton decides to go for a very accurate NES emulator, the CPU usage would be non-negligable.

[1] [http://arstechnica.com/gaming/2011/08/accuracy-takes- power-o...](http://arstechnica.com/gaming/2011/08/accuracy-takes-power-one- mans-3ghz-quest-to-build-a-perfect-snes-emulator/)

<comment><USER11> Nice, I was about to link the same thing.

</comment></comment></comment><comment><USER12> How would you recommend I get started learning Rust? It looks really interesting, but I haven't found any reasonably good tutorials.

<comment><USER13> I thought the official tutorial was good enough to start reading the library code. That's probably about as good as it'll get until the language stabilizes.

* Note: Rust is my language for the year. I can read Rust, follow program flow and I understand the major ideas but I've only put together toy programs.

</comment></comment><comment><USER14> Is there a timeline set for Rust 1.0?

<comment><AUTHOR> We're shooting for the end of the year. No guarantees of course.

</comment></comment><comment><USER15> Love it :-) I'm really looking forward to reading the code.

</comment><comment><USER16> I think it's neat that this doesn't used any managed pointers and avoids the Garbage collector. The fact that you can simply grep a codebase for '@' to find cases of managed memory is great in my opinion. I've been learning the Rust syntax a bit but am currently stuck trying to find a problem to solve with it that doesn't require me writing a bunch of libs from scratch or writing C interfaces. The Std/Core libraries are still rather lacking compared to say, the Go std lib.

I'm sure that will change, but for now it seems unfortunate. For example, there's an HTTP lib as part of Servo but according to some people in the IRC, it's not even very good.

<comment><USER2> Yes, the net lib was originally just intended to showcase preliminary libuv integration rather than as any sort of production library. Work is ongoing on a brand new approach to integrating libuv that will be both more efficient and more flexible. Once that's done I expect a proper, well-designed net library to emerge.

<comment><USER16> Fantastic to hear, I'm excited to watch Rust progress this year both in terms of libraries, language polish and tooling that has been hinted at in this thread. Some folks in the IRC gave me some pointers on another avenue involving HTTP so I've got something to play around with for a while when I get bored of writing Go :)</comment></comment></comment>


Why do Americans stick at Math? - <AUTHOR> http://www.nytimes.com/2014/07/27/magazine/why-do-americans-stink-at-math.html&hn=1 <comment><USER2> [https://hn.algolia.com/?q=stink+at+math#!/story/forever/0/st...](https://hn.algolia.com/?q=stink+at+math#!/story/forever/0/stink%20at%20math)

</comment><comment><AUTHOR> I'm sure I cut-and-pasted the title.

I was worrying so much over the URL (a resubmit since prev submission didn't get anywhere) I must have slipped.

:(

</comment><comment><USER3> *stink

<comment><USER4> We can't spell either.

<comment><USER5> I think I prefer the new title though.</comment></comment></comment>


The truth about Purism: Why Librem is not the same as libre - <AUTHOR> http://blogs.coreboot.org/blog/2015/02/23/the-truth-about-purism-why-librem-is-not-the-same-as-libre/

<comment><USER2> Comments moved to [https://news.ycombinator.com/item?id=9912034](https://news.ycombinator.com/item?id=9912034), except for the one that needs this URL for context.

That story has been on the front page for hours and is the place to discuss this.

</comment><comment><USER3> They're still the only laptop which ships with a hardware switch for the camera. They could focus on advancing on all side topics.</comment>


Gorbachev: Perestroika Lost - <AUTHOR> http://www.nytimes.com/2010/03/14/opinion/14gorbachev.html?hp=&pagewanted=print <comment><USER2> Great article by a brilliant man. I like the fact that while he admits his mistakes and points out problems with Putin he does not shy away from pointing out some problems that are completely ignored in the western reporting on Russia -- that the so called "shock therapy" that was urged and urged by western economists and bankers was a total disaster and that the second election of Yeltsin and the first election of Putin were fraudulent.

<comment><USER3> Shock therapy was not bad economic advice. It worked extremely well in the Eastern Bloc satellites that tried it, and the general trend was that the more drastic the privatization, the faster the recovery and ultimate rise to European living standards.

In the former Soviet Union, though, 'shock therapy' turned into simple looting. The country was too big and the political system too rotten to actually carry out any program of reform.

<comment><USER2> Wow, I wonder what those "eastern block satelites" where it "worked extremely well" are.

I was born in an eastern block country and still follow the news there, and let me tell you it did not work very well there. In fact it was very similar to a miniature version of what happened in Russia (except for the oil and gas money).

Your last sentence is the typical way the Chicago boys excuse themselves after their repeated failures -- just by using racism. "Our theories are sound but the locals are too rotten for our high minded theories" ...

<comment><USER3> Poland, Hungary and the Czech republic.

<comment><USER4> Those three countries - along with Romania (and sometimes Slovenia) are the case studies for Eastern Europe. They're where the transition from communism went remarkably well and lacked any sort of violence. Hell, in Czechoslovakia, the workers actually put in unpaid overtime to make up for the work that they missed while they were protesting to gain freedom.

// edit: Don't include Romania, actually. ATB pointed out, rightfully, that the Romanian revolution was among the more violent of the revolutions in 1989.

If you look at the Balkans (countries that used to make up Yugoslavia (sans Slovenia), Bulgaria, Albania, etc), the economic story is slightly different. In Bulgaria, for example, the economy only got back up to pre-1989 levels in mid-2004. The economies here were much more tied to the Soviet Union's and its collapse hit them much harder. Or, they just devolved into a series of ethnic battles, which doesn't go over well with the economy.

<comment><USER5> "Those three countries - along with Romania (and sometimes Slovenia) are the case studies for Eastern Europe. They're where the transition from communism went remarkably well and lacked any sort of violence"

The Romanian revolution was extremely violent: over 1,000 people died and over 3,000 were wounded, and the former dictator and his wife were found guilty in a hasty show trial and executed on the spot. Their former allies then former a post-Communist clique that looted the country for most of the 90s and stole several elections. Romania continues to have one of the highest corruption rates in Eastern Europe.

But yes, aside from that, it went "remarkably well."

This isn't random conspiratorial nonsense, it's well-documented and NPOVed five ways from Sunday: [http://en.wikipedia.org/wiki/Romanian_Revolution_of_1989#Aft...](http://en.wikipedia.org/wiki/Romanian_Revolution_of_1989#Aftermath)

<comment><USER4> Point. Its late for me and I got slightly jumbled up. You're absolutely right that Romania was the most violent of the revolutions and that I shouldn't have included them in the lacking violence part. I've edited the original post to mention this.

Even still, it could have been much worse; the revolution could have failed. And it lead to a stable government that successfully transitioned between parties afterwards. And the Romanian economy is doing fairly well. I'd call that a pretty remarkable success, given how spectacular the failures in Eastern Europe are on the opposite end of the spectrum.

 _Their former allies then former a post-Communist clique that looted the country for most of the 90s and stole several elections._

I haven't really read much about this, Romanian elections being fraudulent. Don't suppose you could recommend a few good news articles or other data (books or papers, perhaps) on the subject (Romania after 1989, not just elections specifically)? The Wikipedia article doesn't have any citation for it either.

<comment><USER5> Henry F. Carey; East European Quarterly, Vol. 29, 1995, "Irregularities or Rigging: The 1992 Romanian Parliamentary Elections"

<comment><USER4> And something more recent to show that the trend has continued? Romania has elections every 4 years, I believe. That paper was published after one round of elections. There's been a few rounds since.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> It's interesting that he called out Medvedev as a voice of reason. Outside of Russia, Medvedev is often seen as a simple puppet of Putin. I'm reminded of a joke I heard a few years ago:

One day, Vladimir Putin and Dmitry Medvedev went out to a restaurant for a fancy dinner. Putin, naturally, ordered first.

"I'll have the steak."

The waiter replied, "Very good, sir. Now, what about the vegetable?"

To which Putin answered, "He'll have the steak too."

<comment><USER7> There's a similar joke about Margaret Thatcher:

<http://www.youtube.com/watch?v=4agXi15LfS0#t=2m03s> (via Spitting Image)

Which came first?

</comment></comment><comment><USER8> Does anyone else marvel at Mikhail Gorbachev's writing appearing the in the New York Times? That, if nothing else, is a sign of how far we've come from the cold war days.

<comment><USER9> No, I don't marvel at all.

<http://en.wikipedia.org/wiki/Walter_Duranty> <http://en.wikipedia.org/wiki/Herbert_Matthews>

I think any major English language periodical would publish his editorial, which generates more high-brow interest in the English speaking world than in his own country. He has absolutely no influence in Russia today, or for quite some time.

I once had a Ukrainian immigrant barber, who maintained Gorbachev's Russian was very pedestrian, but he had a great English interpretor who could translate on the spot into prosaic English. He (the barber) was very opinionated, and I have never seen anyone make this claim in print.

<comment><USER10> Why would a great interpreter translate something pedestrian to something _prosaic_? (factual; dull; unimaginative <http://www.merriam- webster.com/dictionary/prosaic>)

<comment><USER11> I think "prosodic" is the word he meant.

</comment></comment></comment></comment><comment><USER12> I think everyone will agree the core thesis that a "primitive" economy based on natural resources will not make Russia a great country in the future is true.

The implication that it is fear that's keeping a more modern, complex and innovative economy from a evolving is more nuanced.

I think dictatorships like Singapore are not necessary bad for a strong and diverse economy. I think a true democracy is better, but not by much pure in economic terms. I think it's much better for your humanity.

What really plagues Russia is chaos, corruption and lawlessness. That's what's keeping the small and mid sized business down, they are the ones that could diversify the economy.

<comment><USER8> Being a dictatorship is not inherently bad for the economy. But as you say democracy tends to be better for your humanity, so to speak.

Being a dictatorship magnifies the impact of the quality of the leadership/rulers. In most western democracies our governments are relatively weak. Their ability to help or hinder the economy is somewhat limited as they generally don't directly control the organizations that make up the economy. On the other hand in a country where the government wields absolute power the government's impact is enormous.

Historically most governments around in the world haven't been great so the countries that have done consistently well are those whose governments have limited influence over the economy ie democracies.

Its not that democracy helps your economy. It just dilutes the governments ability to fvck it up.

<comment><USER13> I don't think anyone would disagree that, in theory, the ideal government is a wise, benevolent dictator. The primary problem, in practice, is finding such a dictator (the secondary problem, of course, being how to get rid of him when he turns out to be insufficiently wise and/or benevolent after all).

Democracy is actually a pretty terrible way to run things; as Churchill said, it is the worst form of government, except for all the others that have been tried so far.

</comment></comment></comment><comment><USER4> _The party's top bureaucracy organized the attempted coup in August 1991, which scuttled the reforms._

This bit made me laugh for some reason. Using "scuttle" makes it seems like a rather whimsical take on one of the more important events of the 1990's. If anyone doesn't know what he's referring to, its the KGB and other branches of the Soviet government taking himself (Gorbachev) hostage and throwing a coup. In turn, Boris Yeltsin led protests to restore Gorbachev to power.

Due to his actions, Yeltsin gained popular support and was, in effect, the leader of the Soviet Union as the president of Russia; Gorbachev had resigned a few days after the coup. And the Soviet Union was nearing its end as well; it ceased to exist just over four months later.

<comment><USER14> Don't confuse "scuttle" with "scuttlebutt". There's nothing whimsical about the usage of "scuttle". Pretty standard fare.

Main Entry: 3scuttle Function: transitive verb Inflected Form(s): scut·tled; scut·tling \ˈskət-liŋ, ˈskə-təl-iŋ\ Date: 1642

1 : to cut a hole through the bottom, deck, or side of (a ship); specifically : to sink or attempt to sink by making holes through the bottom 2 : destroy, wreck; also : scrap 2

</comment></comment><comment><USER11> I'm 24, which means I'm just young enough to only know about Gorbachev's premiership through history textbooks. This is not the first time I've seen him back in the headlines, but it's still an incredibly weird feeling every time that I do. It's like hearing from a ghost.

</comment><comment><USER15> Wow, Gorbachev has always avoided directly criticizing Putin until now, afaik. I wonder if there's a nice hot cup of thallium in his future now.

<comment><USER16> I actually thought the article was _very_ reserved at criticizing Putin. The point is basically that Putin destroyed all progress toward democracy, but the article never assigns blame to him exactly. It tends to refer to an abstract entity ("Russia") rather than a specific person (Putin).

<comment><USER17> Which is not without justification, as Putin is very much a product and reflection of modern Russian society.

</comment></comment></comment><comment><USER18> I hope this history is not lost on my fellow Americans: "The Soviet system, created on the precepts of socialism amid great efforts and sacrifices, had made our country a major power with a strong industrial base. The Soviet Union was strong in emergencies, but in more normal circumstances, our system condemned us to inferiority."

We're at a similar brink, though via dissimilar circumstances. While we properly are looking for ways to repair and improve, I hope that there is a strong resurgence of both Democratic and Capitalist principles. The alternative, as some are leaning towards, has a well-documented trajectory. It would condemn us to inferiority.

<comment><USER19> Yes obviously spiraling military costs (aka security costs) had nothing to do with it. We should focus on stopping all infrastructure improvements, and all services and instead funnel that money to the Homeland Security and DoD. They only spend a few trillion a year.

<comment><USER18> I quoted his own words. He's the first to say that Communism failed.

So, to you, Capitalism is nothing other than military spending??? Read some history.

<comment><USER19> How do you get that from my statement? I never claimed capitalism is just military spending. Nor did I claim that communism did not fail. I was however reacting to your implication that some social programs are full on communism.

It is pretty accepted that one of the major reasons for Soviet collapse was massive military spending (unsustainable...). You are suggesting that the way the US is moving recently will make us collapse just like the Soviets. You fail to mention the periodic and massive increase in military spending, which is not recent. This spending now constitutes a very very large portion of the US budget. I worry far more about the constant growth of that spending than about some new programs that cost and order of magnitude less.

</comment></comment></comment></comment><comment><USER20> A man who ruined a one whole world still "has so many ideas".

<comment><USER21> Could you elaborate on that? I think a lot of people here probably don't share your reservations and it would help to say what they are.

<comment><USER20> The second part is a citation of a 15-year old popular joke on Gorbachev, about his incompetence combined with wishful thinking combined with unwillingness to admit his own mistakes.

A world I was referring to is a so called Second World, that was a Soviet block. Being second here does not mean to be somewhere between the first and the third, it means standing on par with (self-proclaimed) First World. And Soviet Union really was a developed, technologically and culturally advanced world. Now we see degradation everywhere, we are on a clear path to the Third World, and we need this modernization. Well, Russia has undergone some successful modernizations in the past, all of them were quite painful. Last one was led by Stalin so you can get an idea of what I mean by "painful", and failed modernizations were even worse. So, it is arguable that Gorbachev made more evil for his people than Stalin did.

<comment><USER22> I'm always wery surprised, that for some people USSR and company was as good as "the West". I mean - ok, you were sending rockets to space, but at that time people in eastern block were many times less wealthy than people in the west, were less free, couldn't even choose the gov.

It was not sustainable, without Gorbachev it would have ended the same, only later and probably more violent.

When you build your civilization on power and military strength and keep people on your side without their consensus, it isn't surprising that you have to spend on military a lot. And when you add inefficient economy to the mix, it's obvious it will fail.

<comment><USER20> _people in eastern block were many times less wealthy than people in the west_

Less wealthy, yes, but not many times less wealthy, provided that all basic (and many not so basic) living needs were covered virtually for free, including guaranteed employment, free medicine, free education and so on. Also, it's easy to be wealthy with a 14-digit national debt.

 _...were less free, couldn't even choose the gov_

That's propaganda. Soviet Union was a pretty democratic state at all levels, and anyyone could choose to go with a party career if he liked to.

 _It was not sustainable, without Gorbachev it would have ended the same, only later and probably more violent._

How do you know?

<comment><USER22> Hm, in Poland before 1989 we had to vote "right", also we always had 98%-99% participation in elections. "Slightly" suspicious, isn't it? Now it's sth like 30-60%.

About going with party career - yes, to have good job people even had to be in the party. What I mean by "less free" is - there was one real party, you had to accept party line to be politician, people couldn't choose other party. People couldn't go out of country without permission, and it was strictly controlled, who are allowed to travel where. Simply put it was totalitarian state.

About the fall of the USSR: because in 1989 and later transferrable rubels were worth almost nothing, there were big inflation, satelitte countries were freeing themselves, and atomic war wasn't an option to anybody sane. It had to end that way.</comment></comment></comment></comment></comment></comment>


The Sun is Setting on Rails-Style MVC Frameworks - <AUTHOR> http://caines.ca/blog/programming/the-sun-is-setting-on-rails-style-mvc-frameworks/

<comment><USER2> What this entry is saying is that whilst MVC is good, server-side MVC with javascpript added on is not. It has an interesting vision for the future: the client-side MVC framework.

So is GWT not good enough?</comment>


Rules for Writing Safety Critical Code (2006) - <AUTHOR> http://spinroot.com/p10/ <comment><USER2> Rules like avoiding recursion and loop upper bounds are partly justified by helping code analyzers to prove executions are bounded.

Does anyone have experience performing formal static analysis on code? And if so, are there any open-source examples of the state-of-the-art tools being used on nontrivial problems?

I've been looking at this recently, but I've never seen a proof of reasonably standard function like, say, printf. Most of the attempts at formal proof I've seen seem quite complex for very simple functions [1] and the next step up seems too complicated for me to follow [2]. I'm familiar with heuristic-based tools like clang analyser, coverity and flexelint - but none of those claim to produce any sort of proof. I'm also aware of MISRA but again, that doesn't claim to provide any sort of proof.

Those of you who are using formal methods: Is what I've seen really the state of the art? Or are there powerful tools I've overlooked?

[1] [https://github.com/Beatgodes/klibc_framac_wp/blob/master/src...](https://github.com/Beatgodes/klibc_framac_wp/blob/master/src/klibc/string/strnlen.c) [2] [https://github.com/seL4/l4v/blob/master/lib/Monad_WP/Strengt...](https://github.com/seL4/l4v/blob/master/lib/Monad_WP/Strengthen.thy)

<comment><USER3> Take a look at dafny [1] and F* [2]. Both are open-source and it appears that both of them are able to prove code to be correct with considerably less proof code than traditional interactive theorem provers (such as Coq or Isabelle), mostly thanks to the use of an SMT solver (Z3, in both cases) to aid in proving.

Both languages are being used in Project Everest [3], which is building a formally verified HTTPS stack, including a formally verified TLS implementation [4].

Unfortunately, there isn't a lot of documentation / beginner guides about these languages out there, but with the little there is, I was still able to start proving non-trivial (but still relatively easy-to-prove) code with them, even though I have no formal verification background whatsoever.

Just as a tip, I found the Dafny tutorial to be a lot easier to follow than F-Star's, but from what I could gather, F* appears to be slightly more general/sophisticated in what it can prove.

[1] [https://github.com/Microsoft/dafny](https://github.com/Microsoft/dafny) [2] [https://www.fstar-lang.org](https://www.fstar-lang.org) [3] [https://project-everest.github.io](https://project-everest.github.io) [4] [https://mitls.org](https://mitls.org)

<comment><USER4> _" F star is an ML-like functional programming language aimed at program verification. Its type system includes polymorphism, dependent types, monadic effects, refinement types, and a weakest precondition calculus. Together, these features allow expressing precise and compact specifications for programs, including functional correctness and security properties. The F star type-checker aims to prove that programs meet their specifications using a combination of SMT solving and manual proofs. Programs written in F star can be translated to OCaml or F# for execution."_

And you wonder why you're not getting any traction.

Dafny, though, seems to have the right idea.

</comment></comment></comment><comment><USER5> I work on software that goes to space. I believe we and NASA use the MISRA coding standard, which is effectively this but taken to extremes. If you actually want to create safety critical code I would recommend that you familiarize yourself with the MISRA ruleset and DO-178B.

<comment><USER6> Space software? Nice! Going to check out MISRA now.

FWIW the initial page just reflects the JPL publication "The Power of Ten – Rules for Developing Safety Critical Code" by Gerard Holzmann [0]

[0]: [http://spinroot.com/gerard/pdf/P10.pdf](http://spinroot.com/gerard/pdf/P10.pdf)

<comment><USER7> Gerard Holzmann is the main author of the formal software verification tool "spin" as well as the owner of spinroot.com. I took a class on formal verification under him at Caltech.

<comment><USER8> As an anecdote, spin was used in Plan 9 to validate the kernel scheduler and the IL network protocol. It was also used to validate a very early version of the Go scheduler.

</comment></comment></comment></comment><comment><USER8> Full 31 rules of NASA JPL C coding standard: [http://lars- lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf](http://lars- lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf)

Previous discussion: [https://news.ycombinator.com/item?id=4339999](https://news.ycombinator.com/item?id=4339999)

</comment><comment><USER9> When I was writing safety-critical embedded programs for medical equipment and an air traffic control system, I found MISRA ([https://en.wikipedia.org/wiki/MISRA_C](https://en.wikipedia.org/wiki/MISRA_C)) and Lutz's "Targeting Safety-Related Errors During Software Requirements Analysis" ([http://trs- new.jpl.nasa.gov/dspace/bitstream/2014/35179/1/93...](http://trs- new.jpl.nasa.gov/dspace/bitstream/2014/35179/1/93-0749.pdf)) useful.

</comment><comment><USER10> I would add "use static type checker from day 1". It's amazing how much stuff Coverity discovers and it can help with the clutter of rechecking invariants of nested functions.

</comment><comment><USER11> Rules like this are much more useful if they're enforced. That's why efforts like the C Secure Coding Rules[1], which were designed with the capabilities of reasonably state of the art analyzers in mind, are a good idea. Like any standard designed by a committee, there are some unfortunate compromises.

Many commercial (and open source) static analyzers will have checks that are hard to codify in rules that are digestible by humans. For example, most analyzers that use sophisticated interprocedural analysis will not be easily described as a guideline for humans, unless those humans are compiler engineers. This is especially true for analyzers that have heuristics built in to minimize false positives, which is most often a real-world requirement.

[1] [https://www.securecoding.cert.org/confluence/pages/viewpage....](https://www.securecoding.cert.org/confluence/pages/viewpage.action?pageId=140705863)

</comment><comment><USER12> An opinionated and needlessly specific list. For example, this

      Use minimally two assertions per function on average

should've been

      Assert your invariants

And this

      Do not use goto statements

is a controversial advice at best, because there are several well-established goto-based patterns that produce a much cleaner code.

<comment><USER13> I would also say perhaps

        avoid recursion

should be revised to

        avoid non-tail-call recursion

Because the justification to avoid recursion is basically avoid running into the limit of stack, and tail-call recursion uses no stack space at all. Of course you still might end up with situations where the function does not terminate, but simple loops can do that too. In relation to Rule No.2, it is also possible to prove an upper bound for recursive depths.

<comment><USER14> Recursion is recursion. Tail recursion is optimized away by the compiler except when it isn't (I've seen bugs with this exact setup more than once), but now you have to verify that the compiler actually does this. It's simpler to just avoid it all together unless you want to formally verify the recursion depth.

<comment><USER8> Apart from that, TCO destroys information that is valuable for debugging (especially for non-recursive tail calls), exactly what you want to avoid in safety-critical software.

<comment><USER15> Manual conversion to a loop also destroys the same information, so it's a wash either way on that front.

<comment><USER8> You can't convert arbitrary tail calls to a loop. You can only convert _recursive_ tail calls to a loop. The information loss associated with non- recursive tail calls is great. It's true that recursive tail calls lose less information, but it is not true that it's equivalent to the information lost in a loop. In a loop you always have access to {head, current, tail} while in a tail call you _might_ (subject to algorithm and compiler optimization) only have access to {current, head|tail}, depending if the loop goes forwards or backwards.

<comment><USER16> But I've found that non-recursive tail calls are great in handling state machines. I wrote a TFTP client and server in Lua [1] and the code was both much cleaner and more reusable between both client and server. Granted, Lua does proper TCO (as long as you properly code the return statement) and the lack of stack trace wasn't much of an issue there.

These rules are mostly geared towards C, which doesn't guarantee TCO at all.

[1] Partly as way to learn Lua and TCO, and as a way to manage Cisco router config files in a version control system.

</comment></comment></comment></comment></comment></comment></comment><comment><USER17> Nice.

These are reasoned, common sense measures, most of which I have seen in one form or another in the coding guidelines of the companies I have worked for as an embedded SW engineer.

Some of them are easy to enforce (no dynamic memory allocation, no recursion), other less so (using asserts, limit function size).

The worst is adding your rules-compliant code to messy and bloated legacy code :)

</comment><comment><USER18> It's interesting that testing is not among the rules and not among the comments so far.

(The details for rule 5 and 8 mention testing)

</comment><comment><USER19> See also my write-up on Dr. Holzmann's presentation at USENIX Hot Topics in System Dependability mini-conf 2012, [http://www.verticalsysadmin.com/making_robust_software/](http://www.verticalsysadmin.com/making_robust_software/) and the full presentation video at [https://www.usenix.org/conference/hotdep12/workshop- program/...](https://www.usenix.org/conference/hotdep12/workshop- program/presentation/holzmann)

</comment><comment><USER20> What have you guys been using to track requirements? I had a bad experience adapting Redmine for a project, and wouldn't want to repeat that in a next project.

<comment><USER5> I have heard that Polarion is an _ok_ requirements management tool for software, but it is expensive.

DOORS is good for tracking and tracing requirements, but from what I can see doesn't do code parsing. This may have changed. However, my opinion of IBM software is irreparably broken so I don't have a huge amount of trust in it.

We use Reqtify to glue requirement documents to code. It also sucks, but I think it's still powerful. You just need to set up some regexes which can recognize your requirement identifier style and you're good to go.

Whoever comes up with a solution to glue DOORS requirements to Jira issues to code seamlessly is going to be fairly rich.

<comment><USER21> I've done a bit a research on this. Company uses DOORS and hates it. We've evaluated JAMA and Polarion (both expensive) and both are better than DOORS. JAMA has a nice JIRA integration. Polarion can be integrated it seems but untested.

</comment></comment></comment><comment><USER22> Funny timing: I just suggested those guidelines, and several related ones, in a post over here: [http://embedded.fm/blog/2016/11/3/resources-for-software- bes...](http://embedded.fm/blog/2016/11/3/resources-for-software-best- practices)

(Check out "Rules for Defensive C Programming" by Dinu Madau for starters.)

</comment><comment><USER23> I wrote my capstone project a week ago on rolling out Simulink for automatically generating SC code en masse and minimising hand written code and manual translation.

I referenced the paper mentioned in my literature review

I would not link it here to the world to see as it is just an undergraduate project and my research did not yield a highly quantitive result, but I am applying the technique on a project right now with good success

</comment><comment><USER24> 10 Rules isn't going to cut it really, its a lot more detailed than that. Here is the Spark reference manual (a standard for Ada that has been the industrial standard for decades): [http://docs.adacore.com/spark2014-docs/html/lrm/](http://docs.adacore.com/spark2014-docs/html/lrm/)

<comment><USER8> Yeah, the point of these rules (and the 31 JPL rules) is concision. Your programmers will read a 10 page coding standard, and might remember it. Nobody is going to remember hundreds of rules and hundreds of pages. They won't even read it.

In his talks Holzmann always makes the point that a coding standard is a hard sell for most people, and JPL hadn't had any success until they could come up with something simple and concise.

</comment></comment><comment><USER25> These are fairly typical modern embedded s/w guidelines, safety critical code is much more rigorous specifically on the design & requirements side.

</comment><comment><USER26> Why not just call it "Rules for Writing Code"?

Who would ever, for example, consider checking the return value of some function but then think "ah, this isn't safety critical, I'm just skip writing a quick _if_ statement and then leave this as a place that mysterious bugs can arise"? Same thing with assertions.

<comment><USER27> Have you met programmers?

Less snarkily, there are billions of lines of production code that don't check return values for malloc(), printf(), and so on because those failures are extremely rare and difficult to handle sensibly.

Banning dynamic allocation would ban large areas of programming language - Lisp, Python, Javascript, and so on.

<comment><USER28> Even if you check the return value of malloc, that doesn't help when virtual memory is overcommitted. Malloc gets a valid pointer from mmap, but accessing the memory later crashes.

A system OOM may actually show a soft behavior, whereby the whole system thrashes more and more until it grinds to a halt. Whatever your program does is futile and irrelevant.

To QA the program for how it handles null out of malloc, you need to tweak the setup: disable overcommit and simulate low memory conditions. (Or even just switch to an alternative allocator that simulates failures.)

Checking the result of malloc for null is of course good for maximal portability: your code can be reused where the check actually means something.

Checking for null and not _testing_ that logic is almost no better than not testing at all (in keeping with the general hypothesis that untested code is junk).

</comment></comment></comment><comment><USER29> Ask HN mods: How is this URL different from the one in [https://news.ycombinator.com/item?id=12864032](https://news.ycombinator.com/item?id=12864032)? I was under impression that submissions are unique...

<comment><USER30> They are not, it's even explicitly allowed to repost links that didn't see activity as long as it is not overdone. I think currently the system only rejects perfectly identical URLs for a few hours.</comment></comment>


ByteDance is going from strength to strength - <AUTHOR> https://www.economist.com/business/2020/04/16/bytedance-is-going-from-strength-to-strength <comment><USER2> I think one part of its success is that TikTok really hit a nerve w/ its core social appeal: miming to pop culture artifacts. For those of you who remember Youtube back when it was just a sketchy looking website in a sea of seedy websites, the 2nd (?) video that ever went viral was this: [https://www.youtube.com/watch?v=x1LZVmn3p3o](https://www.youtube.com/watch?v=x1LZVmn3p3o). In essence the same concept as TikTok. Just to take the message home, singing along is one aspect of social miming, from it there's endless variations, so endless potential to create content. And once you generalize from miming top10 songs to miming challenges created by other people, you arrive at the heart of TikTok's social mechanics: it's not just creating videos or remixing songs, it's creating culture, conforming to it, and bending it towards yourself.

</comment><comment><USER3> They've nailed the formula for addictive social media apps. I discourage people from using TikTok, but I've played with it and it hits all the notes and delivers small hits of dopamine effectively.

What they're doing with social apps reminds me of what happened to pop music:

[https://nypost.com/2015/10/04/your-favorite-song-on-the- radi...](https://nypost.com/2015/10/04/your-favorite-song-on-the-radio-was- probably-written-by-these-two/)

Once you nail the addictive formula and get it to drive network effects, the rest is pretty easy. Warehousing vast amounts of data at scale and doing analytics on it is no longer hard, unlike back in the early oughts when Facebook started. The addictive formula and network effect is the only thing you have to master. The rest can be rented from cloud companies.

</comment><comment><USER4> China should allow non-Chinese social media companies from operating in mainland China or else international governments should ban Chinese social media companies from operating in their borders.

This is absurd. China is surveilling the world with their apps now.

<comment><USER5> I'm starting to think that this kind of idea is dangerous.

Chinese apps are left unchecked as long as they are loyal to the regime, but international companies would be held accountable back home for their actions in China, in an inevitable race to the bottom, this is competitive disadvantage and outsiders are doomed to fail.

</comment></comment><comment><USER6> [https://archive.md/jjjRS](https://archive.md/jjjRS)

</comment><comment><USER7> Can anyone explain to me why this has gone to the moon and Vine died? To an uneducated observer such as myself, TikTok and Vine are basically the same. What separates TikTok?

<comment><USER8> Vine was killed, it didn't die.

Also, Vines felt really standalone. TikTok manages to feel both like a community and like cable TV: you can choose to interact with replies and remixes, or you can just passively sit back and let it serve you an endless array of amusing 15-second clips, with a stream that quickly learns what you like and shows you more of it.

</comment></comment><comment><USER9> > it is now the world's biggest unlisted technology "unicorn", recently valued > at between $90bn and $100bn

You know, maybe there's actually nothing incorrect about these astronomical unicorn valuations. Maybe the Reverse Flynn Effect is causing our society to place economic value in different areas than it did in the past.

<comment><USER10> Just like Netflix bring more valuable than Disney. Absurd on every measure.

</comment></comment><comment><USER11> TikTok is pretty much a carbon copy of Vine. If Twitter wasn't able to make money from Vine, ultimately choosing to shut it down, is this a sign that apps like TikTok are fundamentally unprofitable or that Twitter is just a poorly run company unable to monetize their products?

<comment><USER4> Profit is the least of their concern. Tik Tok is backed by the Chinese govt. The more downloads the more spying.

</comment></comment><comment><USER12> Has anyone here tried using their Lark suite (looks to be a G Suite competitor)? I'd love to hear more details about it, because they've done a great job on TikTok/Douyin regardless of the issues with CCP.

</comment><comment><USER13> Expect Mr. Zuckerberg to lobby even more for regulatory capture and seed FUD (some of which is justified) in (vain) hope he'll win this battle.

Though to be fair, most of the growth now is coming from his secondary brands, WhatsApp and Instagram, which seem they're being better run.</comment>


The Most Widely Read Magazine in the World (2010) - <AUTHOR> http://archives.jrn.columbia.edu/2010/nyrm.org/2010/05/13/the-most-widely-read-magazine-in-the-world/index.html <comment><USER2> One of the members of the faith here, if anyone has any questions.

<comment><AUTHOR> How important is the magazine to members?

Is it something you mostly hand out and don't care much otherwise? Is it important to the faith in practical terms? Do you get information/doctrine there you haven't already got from services?

<comment><USER2> Doctrinal changes often come through the magazine, specifically the "study edition". At the time of the writing of this article, there were not two editions. Now, there is a public edition (used for placing with the public) and a private one.

Some people might wonder if the study edition stuff is secret, it isn't. Its just "optimized" for the different audiences. You can find them all here: [https://www.jw.org/en/publications/magazines/?contentLanguag...](https://www.jw.org/en/publications/magazines/?contentLanguageFilter=en&pubFilter=w&yearFilter=)

At the weekly weekend meetings (typically Sunday mornings), the study articles are studied, so this information also comes through services, eventually.

Edited: for clarity around the link to the study editions.

<comment><USER2> For example, there was some updates to understanding in article studied yesterday and last week: [http://wol.jw.org/en/wol/d/r1/lp-e/2016844](http://wol.jw.org/en/wol/d/r1/lp-e/2016844)

</comment></comment></comment></comment><comment><USER3> One ex-member of the faith here, if anyone has any questions.

<comment><USER2> How do you feel about it now?

<comment><USER3> I'm critical of the faith now (and all religion), so I feel good

<comment><USER2> Understood. I considered myself an atheist for a time, and it is very common in the programmer community.</comment></comment></comment></comment>


Are Your "Secret Questions" Too Easily Answered? - <AUTHOR> http://www.technologyreview.com/web/22662/ <comment><USER2> My problem with secret questions is that I dont have a ready answer for a lot of them. What is your pet's name? None, my SO is allergic to them? Who was your favorite elementary school teacher? She was old and ugly and wore see through blouses, but I can't remember her name. It was a long time ago. Maybe if we could make up the questions too, it would help. What is your SO's daughter's married name? Whatizname. No, no. I just went to their wedding. It'll come to me.</comment>


Android Is Suddenly In A Lot Of Trouble - <AUTHOR> http://www.businessinsider.com/android-is-suddenly-in-a-lot-of-trouble-2012-4 <comment><USER2> I have an Android phone (Droid X, old I know,) and I love it. But what's odd to me is when hardware companies fork and go without Google, they say "no- but", rather than "yes-and".

"Does it have all the stock Android features?"

It's often: "No, but we added ringtones, wallpapers, and our own store instead of Google's."

It should be: "Yes, and we've added useful tools to increase/aid functionality."

</comment><comment><USER3> This seems like a whole lot of conjecture without any real information.

> Facebook buying Instagram for $1 billion. This is bad news for Android, > because it shows that a developer can build a massively successfully product > that the world goes crazy for without even using Android. You could argue > that Instagram wouldn't have sold for $1 billion if it hadn't gone to > Android and seen an immediate spike in activations. But, the truth of the > matter is that Instagram was fielding offers from Facebook before it was on > Android.

But then we have reports that it was Instagram's explosive growth on Android that triggered Zuckerberg's insanely fast purchase of it:

[http://articles.businessinsider.com/2012-04-14/tech/31340760...](http://articles.businessinsider.com/2012-04-14/tech/31340760_1_mark- zuckerberg-android-users-facebook)

[http://www.digitaltrends.com/mobile/zuckerberg-did- instagram...](http://www.digitaltrends.com/mobile/zuckerberg-did-instagram- deal-by-himself-whittled-systrom-down-from-2-billion/)

> Two days before Zuckerberg approached Systrom, Instagram released a long- > awaited version for Android-powered devices. Millions more users downloaded > the free retro-styling photo app within days, adding to the already enormous > iOS user base and taking it beyond the 30 million mark. Unable to wait any > longer, Zuckerberg got on the phone and invited Systrom to his place. After > three days of talks, the deal was done.

The reports would seem to indicate that it was the enormous growth Instagram experienced _because_ of Android that spurred Facebook into making a fast acquisition. If Android isn't relevant anymore, that's an odd way to make the point.

> Android: It has been a complete and utter disaster in the tablet space.

This point is a little easier to support, because by all measures, Apple is dominating the tablet space. However, I don't know that it's possible to say that this is a tolling of Android's decline - Apple was dominating the smartphone space until the Nexus One, too; the N1 marked the start of the "viable iPhone competitor" phase of Android phones. In 2010, Android marketshare went from 9% to 42%.

Google is rumored to be working on a canonical "Android Tablet" to be released sometime this year. It'll be interesting to see what happens after it is released.

> The success of the Kindle Fire shows that you don't need Google's approval > to create a great Android product. This is only going to lead to more > companies doing the same making Android more fragmented and causing Google > to lose control over its mobile operating system.

Android is open source, and has already been "fragmented" by every carrier's handset already. It's arguable that this has contributed to its growth, rather than retarding it. HTC Sense, Motorola's Motoblur, and Samsung TouchWiz are all very different facets of Android. Everyone throws around "fragmentation" like it's some kind of killswitch for Android. Does the author even understand what kind of fragmentation he's talking about?

> on the three biggest carriers in the U.S., the iPhone is outselling Android.

Wow, this is some shoddy reporting. "Verizon reports that half of the phones it sold last quarter were iPhones. This means that iPhone is outselling Android on Verizon, AT&T, and Sprint, nevermind that we have no data for the latter two and the assertion is pure unsupported conjecture". This alone should be sufficient to reject the article, but...

In Q42011, Verizon sold 4.3m iPhones, out of 7.7m smartphones sold (~55.8%). Q1 2012 sales were 3.2m of 6.3m, or ~50.8%. The iPhone 4s was released in Oct 2011, and each iPhone release always sees a sales spike. Given that the iPhone isn't likely to have another new release until Q4 2012, and that the iPhone's sales percentage saw a relative ~10% drop quarter over quarter, I'm not quite sure how to interpret that as "iPhones are booming, Android is dying".

Sales of the iPhone have certainly surged in the past 3 months, but at the expense of RIM and Windows phones, not Android phones.

[http://blog.nielsen.com/nielsenwire/online_mobile/smartphone...](http://blog.nielsen.com/nielsenwire/online_mobile/smartphones- account-for-half-of-all-mobile-phones-dominate-new-phone-purchases-in-the-us)

It's difficult to interpret this data as "Android is dying", when Occam would suggest "New iPhone releases (and the subsequent price drop on older models) always have a spike effect on iPhone sales". Given that the Neilsen data shows that the iPhone purchases are not coming at the expense of Android purchases, I can't help but think that the author is drawing some really faulty conclusions.</comment>


Ask HN: After working 70+ hrs a week my manager says no for promotion - <AUTHOR> I am angry at myself for being stupid. I worked for 70+ hrs a week for one year and built a new groundbreaking platform. During my recent conversation with my manager, he told me it's not enough for promotion and we should wait. I did my best to convince him.
I am wondering what did I do wrong? Quite frequently I get walked over by people. Although I am good at workplace politics I am not best. I am baffled that men and women who are underperforming are going to be put for promotion. I know first hand two people who have caused delays in projects are going to be considered. All they have is probably strong connection with their managers.
How do you navigate workplace politics and getting ahead in the career? Changing job is one option but how long I can keep running from situation? Also,given the state of technical interview and irrationality to ask any irrelevant question, I don't know if I wanna go through it again anytime soon.
What do I need to do to move ahead and up in the career? <comment><USER2> What you did wrong is exactly what so many do wrong: Your market worth is defined by _your market worth_ , not by _how much effort you put in_.

Go out on the market. Update your resume, try to get an offer. Be ready to accept it. Negotiate with your manager and show them empirical evidence you're worth more.

The reason you have to be willing to accept the other offer is that the moment you approach your manager with it, they might decide to replace you rather than promote you. But counterintuitively, your willingness to accept the other offer will work in your favor and is more likely to get you promoted than replaced.

Do not under any circumstances assume that loyalty to your job will be rewarded in any way. The fact that your manager was willing to let you work 70 hour weeks for a year is evidence you were being taken advantage of. That's life, though. The way to win is to play the game.

(There are situations where letting an employee work 50+ hour weeks is justifiable, e.g. if the employee goes into it with eyes wide open and without any implicit promises of future promotion or future compensation increases. Quarterly reviews with salary increases would also take it out of the "being taken advantage of" category.)

As a final note, it's very common for employees to force themselves to work crazy hours without any encouragement from management. It's not necessarily management's job to stop you from doing that, though a good manager will. I did this to myself my first couple of jobs, and had only myself to blame. I'm not saying you necessarily were doing that, but it's such a common story for someone to come into the industry with something to prove and convince themselves to dedicate their life to their job to the exclusion of all else.

Go home each day after putting in 8 hours. The door's right there. If you work harder than that, you should feel like you're getting an excellent deal out of it. And no, promoting you doesn't automatically count as an excellent deal. You should still probably work 8 hours outside of very special situations.

EDIT: If you're feeling upset that you got taken advantage of, don't sweat it. A year isn't such a big deal in the scheme of things. You're far more equipped now for your upcoming years than one year ago, for example.

<comment><USER3> I was with you until you said negotiate with the current manager. Unless OP came up with this 70 hour a week thing all on his or her own, his or her manager had some hand in leading OP to believe that delivering this platform (or whatever) would get the promotion OP wants. One of the most basic responsibilities a manager has to a report is managing the report's career, ie what work merits a promotion. So either OP made some stuff up entirely in OP's head with no input from OP's manager (bad, a manager should be proactively discussing this) or OP's manager led OP astray (really bad).

Either way, I'd suggest rolling the dice and starting over elsewhere. And this time, OP needs to be really clear with the new manager on what OP wants and what work or deliverables gets OP there.

<comment><USER4> >>And this time, be really clear with your new manager on what you want and what work or deliverables get you there.

In many cases even this doesn't work. That is unfortunately how toxic politics really is. Politics is an art of manipulating people and deceiving them into doing things.

In the case you mentioned, its possible that the manager will agree for the deliverables on hand. When the time for reward comes, they will simply say there were other contenders and delivered more than you did. You can't argue much from there, because they will start throwing in the 'confidentiality' card saying "You don't know how much more the other guy delivered".

Its always easy to say this because you don't have any way of verifying it. And calling their BS on their face means permanently damaging your relationship. Then you have no option but to leave.

In short: If you have this kind of a manager, stop fighting the system, just leave.

</comment></comment></comment><comment><USER5> I have no idea what the problem is with respect to your not getting put up for promotion, but I certainly see a problem in your title.

Working x hours a week doesn't mean you should get promoted. Getting promoted has nothing to do with how hard you work but fulfilling the requirements for you to get promoted. If you want to get promoted, talk to your manager and figure out what you need to do to get promoted.

For example, at Google to get promoted you have to show that you are already performing at the level you want to be promoted to. The difference between different levels has nothing to do with how many hours or how hard you work, but with scope, so unless you're given a project that has an appropriate scope for the next level, you aren't going to be able to be promoted, and it's much easier to get things which help you fulfill those requirements if you talk to your manager.

In summary, talk to your manager and good luck.

<comment><USER6> Sounds great in theory, unfortunately, this doesn't really work in many situations because you need to be doing the job you were hired for.

Really, do you want more money or a better title? A better title doesn't really help at all and in fact can hinder. What you want is more money. Best way to get that is to move to another company.

If you want to be promoted to management, you need to learn politics and management. Lots of books on audible can help you with that.

<comment><USER4> >>Really, do you want more money or a better title? A better title doesn't really help at all and in fact can hinder.

If you have opportunity on one hand and money on the other. Always chose opportunity, because a good opportunity will lead to better money in the future.

<comment><USER7> Spoken like someone with plenty of money in the bank, which is of course a luxurious position to find yourself in. And in those circumstances I agree with you.

But the above doesn't hold for everyone, and thus I don't in general agree with your assessment.

</comment></comment></comment></comment><comment><USER8> I've been in this situation. You should leave and get a pay raise that way. Next time when aiming for a promo remember that results alone won't get you there. You have to fiercely and constantly beat your chest about your achievements, and "show leadership", and once you become perceived as valuable, diplomatically let management know that you have much better gigs lined up. It sucks, and I wish it wasn't this way, but that's how it is.

That said, by far the most efficient way to progress in your career is to not let your employers take you for granted by changing jobs every 2 years or so unless things are seriously on fire.

Another bit of advice: do not work much more than 40 hours a week on a sustained basis. Over my 20 year career I have observed negative correlation between that and promotions.

<comment><USER9> >Another bit of advice: do not work much more than 40 hours a week on a sustained basis. Over my 20 year career I have observed negative correlation between that and promotions.

Isn't that a strange twist of human nature in the US workplace? The harder you work, the less respected you are. It's absolutely true though.

<comment><USER8> People who work 70 hours a week on a sustained basis are just bad at saying "no". Not saying "no" often is the surest way I know of to disappoint all those people you're saying "yes" to. People's attention span to things that are peripheral to them is very short, so no amount of commitment is ever enough, and you have to deliver (most of) the things you have signed up for.

You can't do that if you bite of more than you can chew. You _can_ do that if you manage your time properly and say "no" often. That way you have some slack to recover if things go wrong, and deliver on your commitments.

<comment><USER10> ... and even if you deliver 100% of your 175% commitment, I have a somewhat dark and cynical hypothesis that the manager may secretly feel guilty about overworking you and resolve this guilt by downplaying your achievements.

Merely feeling or behaving like a doormat for no reason will make many people around uneasy. Any situation that shows you somehow deserve it, relieves them. If they aren't self-aware enough to recognize this, congratulations, you are training them to exploit you.

</comment></comment></comment></comment><comment><USER11> I want to commend you on taking the opportunity to examine the situation rather than just letting it go. It can be really hard to break out of a rut. While everyone else is suggesting the obvious; find someone who will pay you more, I'm going to offer a slightly different angle because when you mention other people who are underperforming are being considered and that you are good at office politics, it raises a red flag for me.

First, I would recommend taking a long look at your communication skills. Growing in the workplace is often about effectively selling your vision and then making sure it gets executed. Whether its a corporate strategy or a update to an internal microservice, you're going to need to get people to buy- in to your ideas. Just because you can do the work, doesn't mean you can get other people to do the work too.

Second, another concern of mine is that you aren't properly understanding the goals of the company, or those of your immediate supervisors at least. If you put in an insane amount if hours and hit all your deadlines, but people who work less and cause delays are being considered for a promotion instead of you, it leads me to believe you might be doing things you aren't asked to do, which leads me to believe you might be a bit of a rogue employee, always doing what you think is best even if it's not what your supervisor wanted.

Finally, another nod to communication skills. The fact that you put in so much time and your colleagues might not be, makes me wonder if you don't work well in a team. If you're a solo 10xer, great! but you still have to work with other people if you want to grow within a company.

regardless, the absolute most important thing is that you are very correct to question the circumstance. Something has to change!

<comment><USER12> > _Growing in the workplace is often about effectively selling your vision and > then making sure it gets executed_

It's so hard for me personally. It can be really discouraging knowing your idea is good but you can't get any buy in. I have to stop and think, and ask myself "is it worth it for me to jump on my sword for this?" Often times the answer is no.

<comment><USER11> More people struggle with this than you think. Leadership IS hard.

If you are having a hard time with this, take a step back, instead of telling people what you think would be better, ask what they think would be better.

It's easier to get people to put time into something they already believe in rather than a whole new idea.

</comment></comment></comment><comment><USER13> A few life lessons after a decade in IT:

1\. It's 10% about what you do. And 90% about how you present it. Presentation includes getting people to people know your value, your impact to the business, and most importantly, talking yourself up, and talking yourself up to the right people :). The higher you go, the more important this is. Which goes to point 2:

2\. The higher you go, the more it is about who you know, and how well you know them. Who's ear have you got? How influential are they, and who are they influencing? What do people think of you?

3\. Then it's your teammates, and your peers. You want to get promoted, but what do they think? Are they going to support you? The company thinks of this too.

You mentioned people who have caused delays, being considered for promotion instead of yourself. How well do they hit the above 3 points?

The higher you go, the more that it becomes a people job instead of a technical job. One thing to ask yourself as well is, do you want to go up? Or do you want to stay technical? If you want to go up, better get in the game!

It's normal to get frustrated on the journey up the ladder. As others have mentioned, the hours are only the entry price, there's many other factors at play here. Btw, as you'll know when you become a manager, his job is to make sure you deliver - and you have, for one year already, 70 hours a week. His job is not to get you what you want, his job is to make sure you work (and the harder that he can make you work, the better). Personally I don't agree with this approach, and it's not one I use, but then again, I've personally had many managers like this.

Ultimately, you will be promoted. I'm sure of it. You're already talking to the right people (this audience :)). It'll just take time. How much time, depends on how well you master factors 1-3 above.

<comment><USER14> This is both true and sad. It's also why I've stayed predominantly technical (I did take a managerial role at one point but changed jobs for a technical lead position). Some people may be cut out for middle management corporate bullshit...I am one of those that is not :)

</comment></comment><comment><USER4> Lets say you worked 75 hrs a week? 5 days a week- So that comes to around 15 hrs a day. That is a lot. Even with 6 days that is 12 hrs a week. _Never do that again_. Unless you are working on your own venture or have somebody over you, a boss that has agreed to reward you in return before hand.

My guess is you work at a big corporate. Then Im sorry to break out the bad news to you. You managers knows too well that you are hard working and deliver results. But he likely has a political cartel going on, due to which it doesn't really matter how hard you work. In fact you can even do 120 hr work week and all you would be at the end is a useful work donkey on which he can dump all the work while he rewards his lackeys. _Never ever ever, contribute good work to an unfair system._

And yes you got it right, your only option is to keep hopping jobs until you find the right manager. There is no known solution to this problem unless you wish to be as big a fraud and cheat as much as they are or bigger.

The only advice I can give to you is to not take this to your head. Spend your time being productive, useful and gaining skills as you spend time in this profession. These investment pay on the longer run.

But as far office politics itself is concerned. Alas there is no other solution. Unless you find a manager that can take care of you, or you are just enjoying an insane patch of luck. You just have to suffer through politics.

No known solution exists.

</comment><comment><USER15> A true story for your consideration:

One of my first jobs was as a dishwasher at a pasta shop. A few of my friends worked there and helped me land the job. One of them, Kevin _, was a particularly good dishwasher--fast, efficient, conscientious. The managers were vocally appreciative of his work and used him as an example.

One day, I was talking to one of the other friends, Macey_, and I mentioned that I thought Kevin was probably up for a promotion. The career path at this pasta shop was dishwasher > cook > waiter > manager, and at a place like that you could move up pretty quickly because turnover was so high. Macey said with some confidence that Kevin would never get promoted. He was just too fast at washing dishes. He'd made himself indispensable, especially on high-traffic evenings, and the management would never gum up the works by moving him to another position.

Macey was wrong. Kevin was promoted to cook within a few weeks.

I guess there are managers who won't promote their most productive employee. And there are managers who will.

<comment><USER15> Apologies for the random italics. I meant to add asterisks indicating that names had been changed.

<comment><USER16> Use the edit, Luke!

</comment></comment></comment><comment><USER17> It doesn't matter what you do, it's what you're seen to do. People that are good self promoters do well at this, and people that quietly get their work done, don't. I don't like this myself, and I'm not very good at it, but it is how it works. You know the type of people that are always telling their bosses what they have done (and usually taking credit for work that was done by the team), they are the ones that move up first. You'd think that bosses would see through this but they often don't.

I have read about 'making your manager look good' as a tactic for promotion, and that seems to make sense too, but I've never really tried it. This probably means not bringing up any bad news too.

This all may seem cynical, but I've seen it work for other people.

</comment><comment><USER18> Did you build the groundbreaking platform solo or did you and a team build it?

Is it truly groundbreaking on its own merit or is this a personal adjective?

If you are part of a team and you are putting in long hours where other team members (çloser to bosses ear) are not, you may brew issues. Pull others in, delegate, share some credit, involve the team.

How well have you self-promoted this groundbreaking (yuge claim btw) platform outside of your own team? Does anyone else at the company know your name or are you the "guy in the basement carrying/justifying three positions with your output"?

It is very tough to catch rec in a large org where everyone is pitted against eachother for promotions.

Some ideas are:

1\. Be careful touting your hours worked as a metric for promotion. Sometimes you look like a sucker rather than a leader deserving promo. Also toutimg hours automatically makes coworkers appear bad. If they have the managers ear, you tell me how this goes.

2\. Consider the word "promotion". If your looking to a manager to "promote you", make it easy for him/her by promoting yourself first. Show other groups/team members this project. Become a trainer. Shake hands and kiss babies accross your org. Let them have no option but to speak your name in conjuction with this groundbreaking platform.

Im in a similar boat. The above are some things ive done to stand out and be promoted. Lots of groundwork over 3-4 years.

</comment><comment><USER19> Without knowing you or your workplace exactly, there's two buckets this falls into. The first is nefarious, where your manager took advantage of you to provide output and will replace you with someone else eager. In this case the only solution is leave and try to determine the red flags that led you to this point to avoid joining another role with the same demands.

The second possibility is that there's a missing communication gap here. As you've discovered, effort alone is not the key to success. Effort may get you between basic levels, e.g. Programmer 1 to Programmer 2, but not necessarily from Programmer to Team Lead where there's more expectations beyond technical skills like mentoring, working between organizations, etc

Some questions to ask yourself and possibly discuss further with manager:

1\. Why did the 70+ hours go on for a year? Was this coming down from top level or self imposed? Where was the communication about sustainability, or outcomes upon completion?

2\. Where was the 1:1s and check-ins during this project that you got to the end before knowing the outcome? You own your 1:1s, use them to discuss your career goals, advancement, and blockers, not just as a status update. Schedule them if your manager isn't.

3\. Was your manager previously aware of your desire to get promoted? Remember, not everyone wants to get promoted. Have you previously discussed goals, measures, and skills to obtain this?

4\. If you previously discussed the goals and measures, why did this 70+hr/wk project not align with these goals? This in particular is a failure of management. "Crunch time" is a given in industry at times, but this seems into Death March territory if it was top-down.

4(b). If the previously discussed goals did align with this project, what else is missing that didn't get met? If everything did get met, argue to that positioning and discussion rather than "I worked really hard and made a thing."

5\. How was your communication of the work you were performing and completing? Sell benefits, not features. Did others perhaps think that you worked long hours because of your lack of skill, thus requiring more hours to make it up?

</comment><comment><USER20> Unfortunately there's no silver bullet, but I'll share my opinion/thoughts.

If the game is to move up the ladder, then it's best to understand what management thinks is important. What does your boss really value, and how do you think they see you?

If you know underachievers that are getting promoted, then _somebody_ doesn't think they're underachievers. Are they more vocal/communicative about their work? Do they take your boss(es) out for lunch or hang out on the weekends? Do they dream up new initiatives and share ideas? Good work often goes overlooked, so it's probably on you to make sure your bosses know what you're up to.

You might even consider seeking an objective appraisal of your work (well, as objective as possible). Does your new platform _really_ deliver enough value to warrant a promotion? Maybe, I have no idea.

If it turns out that your work really _is_ undervalued, and the politics game isn't for you, then it might be better to move on.

</comment><comment><USER21> My thought is, maybe you are too good at your current role? Ive heard of good performers not getting promotions because they are needed to maintain performance in their current team. (not in a software company)

</comment><comment><USER22> You'll probably need to give us more context. It's dangerous to speculate without it. What was the value of the platform? How long have you been with the company? Have there been any incidents over the last year that would have created a negative impression of you in the mind of your manager (however justified or unjustified)? Are you an isolated case or is this a pattern at your organization? What is your communication channel with your manager like? One-on-one chats, email, text? How often?

</comment><comment><USER23> Waheell...

This is a big can o' worms, and no one here knows what really went down (I don't think even you do) so there a necessarily going to be some assumptions. Can you forgive me (and the others that are presumably preparing their own replies even as I type this)?

If you're cool with cutting straight to the chase: I'm pretty sure there are some kind of "rules to getting ahead" at your workplace that _you are not perceiving_. I don't know what they are, but I think you must be really whiffing on them bad to not even get a token promotion for what you've contributed.

(One assumption I'm making is that you've done what you said you did. I have a decent BS-dectector and while there's limited info to go on here, I believe you are sincere.)

So...

1\. What promotion did you go for? Your accomplishments have been technical so if you were going for a technical promotion -- e.g. SW Engineer to Senior SW Engineer, or Senior to Principal or whatever -- or just a raise in $$$ then you've made a good case. On the other hand, if you were looking to go into, e.g., management then the technical accomplishments might not as obviously qualify you. (Personally, I think people who show they can excel in domains with complex and competing constraints are qualified for a wide variety of responsibilities, but I haven't found that's a widely held view among executives.)

2\. You manager may be powerless to give you a promotion. Some mangers (weak ones) won't admit it, but they may have no actual power to promote you no matter what they do.

3\. You say you're OK at office politics (good but not the best) but I think there must be some stuff -- some dominant trends -- that you are not fully perceiving. E.g., you thought the way to get ahead was to work 70+ hours a week for a year, but apparently it's actually to develop a "strong connection" with your manager.

I don't know. You might be able to adjust and excel and get the promotion you want at your current employer, but it really sounds like you will be "swimming upstream" there: you've got skills and a work ethic that they don't value.

Consider working normal hours at your current position and in the meantime (1) look for a new position where they might value what you have to offer; (2) spend the newly freed-up hours doing something personally enriching (whether personally or professionally).

Edit: Ah, shoot, went from zero to 37 responses while I wrote this, and the Opost is flagged to boot. Oh wells.

</comment><comment><USER24> Been in similar situation for quite a long time. The only thing that worked exceptionally well for me was to found my own company. I became my own boss, hired a few people, did and currently do some great products.

Before that, I never tried to change the employer to get a raise. I felt pretty quickly that I can do my own game, so there is no sense in making moves to local extremums. Instead, I just used the time at work to get more experience and expertise.

<comment><USER25> What sort of products?

<comment><USER24> Industrial security, desktop-based.

</comment></comment></comment><comment><USER26> The not-so-secret way of getting raises and promotions in the tech world is to switch jobs.

</comment><comment><USER14> Tell yourself this daily: "Quit being a corporate lackey. This company doesn't care about me they only want to extract value from my labor."

<comment><USER27> I too want to extract value for my labor.

</comment></comment><comment><USER28> You won't like this answer, but as you point out, the solution is to get another job.

Broder experience should help, you'll begin to see patterns based on the different places you've worked and be better equipped to handle the problems you encounter.

The only jobs I've really regretted are those I stayed at too long. The last years seem like a waste of time, I could of provided more value, and got more useful experience elsewhere.

</comment><comment><USER29> There are many things in play here.

We humans are social animals and we still have a lot of vestigial stuff when it comes to establish our relative social rank. The people you perceive as being less competent maybe appeal to those vestigial "leadership traits" more. Superficial stuff such as your voice, your posture... and less superficial stuff like how you express yourself, verbally and non-verbally. You can try to work with a voice coach, you would be impressed with the results.

Then, maybe you are a victim of your own success. Being too effective in your role can make it harder for you to be replaced.

Support is required for getting promoted. Support would be taken for granted in a meritocracy, where people recognize and honor merit, by supporting people that deserve a promotion or stepping aside if a better candidate comes up. But not every organization is a meritocracy.

It is not only about doing a lot of work, but also about being able to take the credit for that work. If you were an individual contributor in a team, most likely the credit got distributed among the team or your manager took a good chunk of it.

</comment><comment><USER30> Working a lot will almost never lead to "a promotion". The environment you are in doesn't see the issue with you working 70 hours and did nothing to mitigate it. That is poor management, poor product definition and poor program management. Run from these situations.

Startups that tout "we work hard, we play hard", avoid them. That is synonymous with "you work hard, we hope to profit". Sadly at a YC recruiting event some years back there was an SF startup touting "we are a family" and "we meet with customers after hours to get input" as positive things. I wish I recalled the name of the startup. Unless it is your own startup or you have significant equity (founders shares), your 70 hours is a nice charitable gift to management and the investors.

I've been guilty of this. Caring about the company, product, etc. only to pull my head out of my ass, realize the negative impact on my life and walked away before the 1st year cliff of vesting.

</comment><comment><USER31> You might be working yourself out of a promotion. I once worked for a company that promoted poorly performing programmers to project managers to keep them out of production code.

Good software engineers end up doing the same job but getting titles: Senior Engineer, Team Lead, Specialist Engineer, Consultant Engineer. Basically the same job but with a little prestige.

If you are a hard worker then you should realise your value, line up a new job and take it as a lesson learnt. Changing jobs is the fastest way up the ladder and whatever you do, don't burn bridges. You might be back in 12 months as your managers manager, I've seen it happen.

</comment><comment><USER32> You need to consider that if you're a manager and you have an employee working 70 hours a week, your first intuition might be that they have to invest almost twice as much time as the others to keep up.

This is neither true or fair, but you didn't come here looking for fairness. The reality is that they simply aren't aware of the value that you believe that you're creating, and they certainly aren't happy about you putting in so much time to do it.

Time for the next adventure. This time, set boundaries and make sure to have a social life outside of work. You'll find that things go smoother. Hang in there!

</comment><comment><USER33> Does your contract actually stipulate 70 hours a week, or were you fairly compensated for your overtime? If no to either: why did you keep pulling 70 hours a week after the first week? Because if you worked at the same level as someone working 40 hours, with the only difference being you were willing to work 70 for no additional pay, then as an employee you're not worth more than someone working 40 hours a week. You may have actually cheated yourself out of a promotion or even raise simply by pretending working long hours for the same pay would be worth it in the long run.

</comment><comment><USER34> Why would any company promote you and thus pay you more if they already extract nearly double the total work* out of you for the current pay? You are a mostly-replacable cog in their machine and it's in their best interest to pay you as little as possible for as much effort as possible.

Changing jobs isn't running from it. You change into a higher position with both higher responsibility and pay, and therefore move up.

Don't ever work extra to 'prove yourself'. All you're proving is that they're able to get more effort out of you for no extra cost.

</comment><comment><USER35> Effort and results may not be enough because real life isn't a meritocracy. Insecure manangers worry they'll promote someone whom could be promoted past them as their new boss instead of them getting promoted (promotions as win- loss), save some money on their P&L by BS under-promoting people or pigeonholed someone as a worker role instead of mentoring/trialing them for managing or leading. These and other nonperformance factors can high-peforming staff surrounded by communication major managers.

</comment><comment><USER36> > he told me it's not enough for promotion and we should wait. I did my best > to convince him.

Don't let others make a decision for you -- promote yourself! Want to break out of mediocrity? Here's some food for thought from James Altucher > [http://freakonomics.com/2013/06/05/in-praise-of- mediocrity-a...](http://freakonomics.com/2013/06/05/in-praise-of-mediocrity- an-excerpt-from-james-altuchers-choose-yourself/)

</comment><comment><USER37> so many questions:

1\. Wha did you work on, and how valuable was it to your company? In other words, to whom was this product "groundbreaking?" if what you worked on wasn't perceived as valuable, then you could've spent 100 hours a week on it; the result you experienced would have been the same. Which leads me to:

2\. How often did you catch up with your lead and "skip level" (his or her lead)? Tou want to move up in your career; did you have this conversation with them? have you worked on goals with them? If you haven't, then you were effectively flying blind, hence the result.

3\. Did anyone else know about the time you were spending on this platform that you built? If not, why?

4\. Did your manager tell you why you were rejected for promotion? Did s/he build a performance plan (the good kind) to ensure that you got the promo next time?

Switching companies is a solution, and you'll probably get paid more and perhaps receive a title upgrade, but not keeping these things in mind will limit or handicap your progress eventually. you want to vertically progress, not horizontally unless you REALLY like the space within which you're working (this post tells me that you're not).

</comment><comment><USER38> I would make a concerted effort to improve your English. You may not perceive it as fair, but you will be judged by your usage of language, and some of the mistakes you made in this post would indicate "not management material" to many managers. Believe me I know it's difficult -- I lived for some time in a country where I spoke the local language much worse than you speak English, but this is something you may want to consider.

</comment><comment> barry-cotter Quit right now. Do you know anyone with technical skill and either organisational or political acumen who knows you have technical skill? Go do consulting with them. Go do consulting with someone. Quit and start applying for jobs like it's your full time job. Quit, work on that market for lemons upwork.com and blog about the problems you're solving. Quit, do a Udacity nanodegree and then work on their hiring platform, Udacity Blitz.

But definitely quit.

</comment><comment><USER39> Finding a new job will temporary temporary solve your problem.

Management will only promote people if they think promotion will help them or the company. Promotion is not a way to reward people for their hard work. You have bonuses for that.

If you want to promotion you should already act and take responsibilities as you are already promoted. So instead of building platform you should be convincing other people (or management) for resources to build the platform.

</comment><comment><USER40> Cut down to working around 30 hours a week, ya goof

</comment><comment><USER41> Level 0: Work hard

Level 1: Learn to ask questions until you get a full answer. What are the true blocking points for promotion? What he told you was vaguery.

Level 2: Have an action plan worked out with your manager beforehand, so that the roadmap for promotion is scheduled with clear milestones. This way you can hold someone accountable before you make sacrifices.

Level 3: (long term career stuff)

</comment><comment><USER42> If the promotion was for a manager role, it might simply be because "you get walked over by people".

Good developers rarely make managers unfortunately. While I don't have much info, it could simply be that your manager doesn't think you're fit or ready for a managerial position. And btw, there's nothing wrong with that.

</comment><comment><USER43> One of the advantages of being an older developer is not only have we seen every technology coming and going - and have a deep understanding of what new tech is likely to stick around a while - but we've also seen every office politics scenario as well. We know the technology and we know the system.

</comment><comment><USER44> If your manager says "That's not enough" and doesn't give you any more guidance it is time to find a new manager, either at that company or another one. What you need to be doing should not be a mystery.

</comment><comment><USER45> Seems like you didnt get the memo: [https://www.ribbonfarm.com/the-gervais- principle/](https://www.ribbonfarm.com/the-gervais-principle/)

you are welcome

</comment><comment><USER46> Your first mistake was believing effort has anything to do with success. Its all about who you know, not how hard you work.

Disclaimer, those who works hard and also know the right people can be successful

</comment><comment><USER47> Most people just act irrational and maybe can't really see how much you actually contribute to the organization. We humans are really biased when it comes to choices.

I would read these two books:

How to Win Friends and Influence People

Thinking Fast and Slow

</comment><comment><USER48> You need to quit. Get a new job immediately.

Either your work wasn't very good, in which case your manager should have told you before letting you spend a year doing things that way

Or your manager is taking advantage of you.

</comment><comment><USER49> Maybe try to raise the visibility of what you're working on? Did you ask where he felt you could work on?

</comment><comment><USER50> Stop letting people walk all over you and say no.

</comment><comment><USER51> Best thing you can do, is leave

</comment><comment><USER52> Why is this flagged?</comment>


Ask HN: How do you lead your scrum daily stand-ups? - <AUTHOR> I bought myself a few books on scrum and liked the concept very much. So promoted the methodology within the team and we jointly decided to switch.
Some of team members had previous scrum experience however they did not rate it very high, namely they did not like daily stand-ups, they called them boring confessions.
I don't want to end up my team being bored, I see great potential behind methodology and want to continue practising it. Can you advise how do you keep your stand-ups so the team stays positive about using methodology? <comment><USER2> The stand up should be capped to about 15 minutes, so there almost shouldn't be enough time for anyone to realize its boring.

However, you could try planking instead of standing, choose a cheesy theme song to let everyone know its time to start (think "You're the Best" by Joe Esposito).

Maybe play hacky sack while your standing up and choose the order of who goes next by passing it around the group.

Take a stand up walk, or hold it in a different place around the office so you get to see teams you wouldn't ordinarily interact with.

The best way to make it work is probably to try and get the team to inject some of their own interests and personalities into it.

Find out what they think is fun and get creative with trying to theme it.</comment>


Startup Ideas: Living in the Future - <AUTHOR> http://www.jacobsheehy.com/2013/03/living-in-the-future-startup-ideas/?kgo

<comment><USER2> The drone-related ideas definitely sound awesome and would be fun to work on. I can imagine hundreds of complications that would stand in the way of those ideas working smoothly, though. Probably most common would be your copters losing their payloads, breaking, crashing, etc. Would be tough to recover from a fail scenario like that in an acceptable way, especially for important payloads like medicine ... or tacos. Maybe it'd be simpler to start with less critical tasks, like your weather monitoring idea. That'd be fun and productive.

The document editing one is just "meh" to me. I never was able to make Google Drive part of my work flow, with co-workers. I never found a way to benefit from the sharing in a way directly related to my job. The best examples of the document sharing and editing, for me, were for things like computer game theory crafting in Diablo, and stuff.

That galactic exploration game is like the holy grail of online games, to me. I know 0x10c is aiming to do something close to it. Maybe EVE online is kind of in the same category. But I do envision something where your own little planet starts off with no technology and it's up to you, somehow, to build space ships and things and go explore for other planets. Maybe make the whole game browser-based and allow people to run their own javascript to code stuff, in-game.

</comment><comment><AUTHOR> I'm the author of the post and would be happy to discuss the ideas!</comment>