Better HN
topnewbestaskshowjobs
Log inSign up

cpprototypes

790 karma · joined Feb 21, 2013 (13y ago) · 126 submissions

Submissions

comment 13y ago · link · parent

When I look at Dart vs JS (JavaScript), I see a lot of parallels to Java/C#. The Java language stagnated for a long time under Sun. The language was usable only through the heroic efforts of tool vendors (Eclipse, IntelliJ, etc.) Even with these tools, Java is just barely good enough.

C# is technically a superior language to Java. Combined with an excellent IDE (VS), the .NET platform is probably technically superior to the Java platform. However, .NET did not destroy Java. And it's because Java is superior to .NET in many non-technical areas (such as a better open source community). And other solutions appeared to help the Java platform with the language stagnation issue (Scala, Clojure, Groovy, etc.). Now Java itself is somewhat catching up (Java 8) and the JVM platform remains a powerful and thriving community.

The situation with Dart and JS seems to be similar. The JS language has stagnated for a long time. Google is trying to be like MS with C# and created Dart to fully replace JS. And Dart is probably technically superior to JS. But just like Java vs C#, I don't think technical superiority will be enough.

The JS platform is addressing the language issue with CoffeeScript, TypeScript, and others, just like Scala and Clojure appeared for the JVM. And JS itself is improving slowly (ECMAScript 6) just like Java 8. And the JS open source community is very very strong (all the web related libraries and frameworks and now additional strength from Node.JS) and it's unlikely Dart will have a comparable community. I think that Dart may achieve some success like .NET/C# did. However, I don't think it will destroy JS like Google hopes it will. The JS platform is just like the JVM platform. Has so many flaws, but is good enough.

comment 13y ago · link · parent

Competition is good but for app development it's becoming too much. Android and iOS and WP and maybe Firefox OS? Who can handle developing four versions of an app? There's been a lot of debate on native vs web based on performance. But web may become the only reasonable way to release an app on all platforms.

comment 13y ago · link · parent

I think that depends on if the salary is fair. If it's not fair (below market) then it becomes the overwhelming factor. Above fair, it quickly has diminishing returns and other factors are stronger. Part of good management is recognizing this.

comment 13y ago · link · parent

There is an easy solution and I don't know why so many companies can't understand this. It's simple, pay a fair amount and there will be lower turn over. Every employee should be evaluated every two years so that their salary is at least the market median. And a raise doesn't even have to match what an employee would get from switching jobs. For example, if an employee could get 10k raise by changing jobs, many would stay if given a raise half of that. The reason is, switching jobs is risky. Next job could have a bad boss, bad coworkers, etc. If offered, it would often make sense to stay at a good job and take the 5k instead of going for the 10k with unknown risks.

But instead they just give no raises, or even insult their high performers with a "generous" 3% and cause resentment and lower morale.

comment 13y ago · link · parent

I agree that the current state of Node.JS is not good, however there is potential for a brighter future. The language itself is improving (such as ECMAScript 6 including yield/generators which will allow things like this https://github.com/visionmedia/co ) which should reduce the callback hell situation. Besides popularity and momentum, the language and runtimes have solid engineering talent behind them (Google, IBM, Microsoft, and others are on the ECMAScript committee and there's several big corporation supported JS engines (V8, SpiderMonkey, Chakra, etc.))

comment 13y ago · link · parent

Experience matters a lot in software development. For example, after many years as a software developer this is one of the valuable lessons I've learned:

Outside data is ALWAYS dirty.

There is no clean data. And part of the value of experience is knowing how to handle this. For example, assume I get a very large data set from a third party that is crucial to my project. Unfortunately, all the fields are strings. Years of experience have taught me the following ways to deal with this:

1) Implement a lot of logic and validation into the program itself or as a pre-process step. This is a lot of work, requires a lot of domain knowledge, you may still miss a few edge cases, it will force the deadline to be pushed back, and increase the budget. However, those are the disadvantages. The advantages are that this could become a competitive advantage. Maybe no one else knows or has tried to clean up this data before. Identifying and doing this work can lead to a whole new business. A classic example of this is GIS data. GIS data is very very dirty. Street, St, St., Highway, Hwy, Freeway, Fwy, all typical examples of how dirty the data is. Companies like Navteq are based on their ability to clean up GIS data. Apple's Map app was a disaster because Google is so good at and has years of experience cleaning up GIS data.

2) Push back on the third party to clean up their data. Doing this takes some finesse and social/business skills. You can't just say, the data is hard to handle. That sounds like whining and laziness. Your manager can't do anything to help you if that's all you have. Instead one tactic is to make a schema (this is what WSDL and XML Schemas were invented for) and tell the third party that their data must conform. Then it becomes their problem. They might push back, but now your manager has something to fight with. But if they agree to conform and the schema is bad, then it will become your fault (the third party will just say, hey it conforms to your schema so that's your problem). So you better make sure the schema is good (experience helps here). And it may require meetings with the third party's technical team to compromise or figure out what a good schema is (which requires social/business skills and experience).

3) Identifying these problems early. If these data issues are not considered or found early, they will lead to big issues later. This is why senior developers get their work done fast and go home early. They don't make mistakes like using floats for currency or assuming a string is always a certain format. Junior developers make those kinds of mistakes and spend 80 hour weeks fixing it in the code, rewriting unit tests, and running scripts against the database to carefully migrate the data. They may seem more "productive" but they created the work (like the broken windows fallacy).

comment 13y ago · link · parent

I think this may contribute to a trend away from mobile native apps to web apps (or web apps in native wrapper like phonegap). It's already difficult supporting iOS and Android. But what if WP and maybe Firefox OS also gain significant market share? How many companies can support 3+ dev teams for an app?

comment 13y ago · link · parent

I remember a simple tactic that I used in the WoW AH to make some money:

1) Buy bulk of item X.

2) Divide item X into single units and post on AH with a markup in the price.

People would then buy it because they would need only 1 or 2 of X instead of 10. It only worked for some items and under the right market conditions, but when it worked, it was a simple way to make money. From this I learned some important lessons:

1) Convenience == profit. This is the basis of a lot of business and industry. Why do people use and pay netflix instead of downloading shows? Convenience. Why do supermarkets exist? Convenience. And this is just a specific form of a more general rule, time == money. If you can save people time (convenience) then they will pay you for that service.

2) It made me appreciate and respect more how difficult this must be in the real world. In the WoW AH, I don't have to worry about things decaying or transportation or other things. But the supermarket down the street with shelves full of food? How do they know how much to buy in bulk and sell in units before the food expires? What do they do if they're wrong? I realized that just managing the inventory at a store could be an interesting computer problem. Models, simulations, even some AI could be used to try to figure out the best decisions. And companies already do this and those that do it well have a massive competitive advantage.

comment 13y ago · link · parent

Most of the articles and blog posts about Google are about Mountain View. Does anyone know if the satellite offices are good? I think I've read some good things about New York, but haven't heard much about any others.

comment 13y ago · link · parent

What happens to these developers after a few years in the industry? Is there an invisible salary ceiling they hit faster than developers in non-SV areas? Or does it increase at the same rate as developers in non-SV areas? I don't live in SV so I'm curious how high a typical senior dev salary is if the junior dev salary is already so high.

EDIT: I just looked up Software Engineer III in San Jose on salary.com. The median is $108k and the upper 90% is $130k. So how can the salary for someone who just graduated be 100k+? Is that just for google and facebook? And all other companies in SV pay much less?

comment 13y ago · link · parent

AngularJS is a level of abstraction above the old JQuery and Backbone style of app. It frees the developer from worrying about the tedious details of updating the DOM. For example, a typical old style app would do something like this:

  function updateCheckoutButton(cart) {
    if (cart.length === 0) {
      $('#checkoutButton').addClass('light-blue');
      $('#checkoutButton').prop('disabled', true);
    else {
      $('#checkoutButton').addClass('dark-blue');
      $('#checkoutButton').prop('disabled', false);
    }
  }
And in the HTML:

  <button id="checkoutButton"></button>
Compare that to how it would be done in AngularJS

(In the controller code)

  scope.isCartEmpty = function() {
    return cart.length === 0;
  }
(In the HTML)

  <button ng-class="{'dark-blue':!isCartEmpty(), 'light-blue':isCartEmpty()}" ng-disabled="isCartEmpty()"></button>
The AngularJS style has the following advantages:

1) Code reduction - The C language was invented to be an abstraction above assembly. Assembly code has a lot of low level details of moving values from registers, adding them, etc. The C language abstracts that away. In a similar way, AngularJS abstracts away the low level details of DOM manipulation.

2) Data binding - In the first example, it's important that updateCheckoutButton() is called wherever it's necessary for it to be called. Otherwise bugs could appear when the button is not updating when it should. AngularJS simplifies this to just listening for changes in the scope. It's possible to achieve the same thing using events, but again that's a lot of low level details of managing events and event propagation.

3) Declarative UI - <button id="checkoutButton"></button> tells me nothing about how this button behaves. The AngularJS example is immediately obvious on the button's behavior.

4) Unit testing - I can write a unit test to ensure that the value of scope.isCartEmpty is updating correctly. This test can be pure JS without any DOM support. It's much harder to test the DOM manipulation code style.

comment 13y ago · link · parent

Yeah it's similar to some Java technologies, especially Spring or Guice.

comment 13y ago · link · parent

I think this depends on a developer's background before using AngularJS. I've used Spring (Java DI framework) for a while and AngularJS DI was easy to understand. However, the first time I was introduced to the DI concept, it took a while for me to understand it. Some of the complaints about the difficulty of AngularJS DI could be because for some JS developers it's the first time they've been introduced to the concept.

comment 13y ago · link · parent

This is a bad example. Why do that when you could just bind directly:

  <span>{{ someValue }}</span>
And in the controller JS file do

  switch (foo) {
    case 'bar':
      scope.someValue = 'hello';
      break;
    ...

comment 13y ago · link · parent

If technical competency has already been established, then there should be no problem with asking these kinds of subjective questions since it's meant to screen for a subjective area (team/culture fit).

comment 13y ago · link · parent

Does anyone else think like we're already in the "core 2 duo" era of smartphones? I look at my galaxy s3 and the newer phones and don't feel much motivation to upgrade.

comment 13y ago · link · parent

For me, what helps a lot with tech interview stress is to already have a job. It turns the tables so that I don't really need them, they need me. The change in attitude is powerful and gives confidence.

comment 13y ago · link · parent

If someone is married and has children, then it's likely they've been working for a while (for example, assuming a typical graduation at 22 and kids at 30, that's 8 years in the industry). In that situation, technical interviews require a lot of time preparation. It would require looking at old college textbooks/notes, doing practice interview questions, etc. The amount of time required is probably about the same as a "make a webapp".

comment 13y ago · link · parent

I've been a developer for 8 years. I have a good job already. When I get an email from a google recruiter, I usually think this:

My free time is very limited and valuable. Google sounds interesting, but here are my options:

a) Spend my free time exploring and building small projects with new technologies and techniques. Maybe work on a mobile app that could make some money.

b) Find my old CS textbook and notes and do algorithm studying and exercises just to prepare for an interview.

Doing a) directly improves my skills and has lots of benefits. I've been able to improve projects and gain a lot of good reputation at work because of things I discovered doing a). a) could also lead to making a revenue-generating mobile app. And perhaps most important of all, a) is FUN.

Doing b) just feels like a giant waste of time. Doing b) is a direct opportunity cost of not doing a). The potential return for b) is what? Going through a day long interview with judgmental engineers trying to look smart? And it's boring. It was fun learning in college when it was the first time and I had that aha moment of understanding. Now its just boring to go over it again and again just to rote memorize things. I would rather be building or learning something new.

comment 13y ago · link · parent

ES6 generators will be the solution for callback hell in node.js. Node 0.11 already has generators support hidden behind a flag (--harmony-generators) and eventually it will be enabled by default. Generators + libraries like this

https://github.com/jmar777/suspend

will make node.js code more readable.

comment 13y ago · link · parent

The UI performance for your web app is impressive. Did you use any other libraries besides fastclick? Or was it a lot of manual work and research to make the UI perform well?

comment 13y ago · link · parent

Apple partly helped make Samsung popular with their ridiculous patent lawsuit. It was a lot of free press for Samsung.

comment 13y ago · link · parent

I just ordered through amazon, but am I too late for the 3 months? Is there any way to check?

comment 13y ago · link · parent

The "Buy Now" page has two options now: Google Play and Amazon. If I buy it through Amazon, do I get the 3 months netflix? Or is it only through Google Play?

comment 13y ago · link · parent

The biggest issue with public transit in LA for commuting is the last mile problem. It's similar to the "last mile" problem of fast fiber optic cables to slow copper wires to homes. Here the issue is efficient and fast rail transit to extremely inefficient bus system for that last few miles from stations to work. I once tried to plan my commute using public transit and here's what I found:

1) Drive to rail station for park and ride? About 10 minutes, great.

2) Light rail to station nearest to my work place? About 30 minutes and covers 90% of the distance, awesome.

3) Station to my work place? About 1 hour using bus system...

I'll just drive instead since even with bad morning traffic I'll still get there faster because the bus system is really really bad.

I get a bit upset when I think about it because I can get there 90%, but that last bit is ruined by the stupid bus system.

comment 13y ago · link · parent

I agree that it's enough to know well one low level (or medium level) language and one high level language. For me, I decided a while ago that the two languages will be Java and Javascript. It was an easy decision since I use those languages at work, they both have healthy and growing ecosystems, and active communities.

comment 13y ago · link · parent

I wish V8 already had generators back when node.js started. It would've been a true solution to callback hell. There's libraries like async to help with that, but it's not as good as something like tasks.js could be.

comment 13y ago · link · parent

I have a question about asm.js. My understanding is that it's only useful for (static typed language) -> asm.js, is that correct? It doesn't make sense for (dynamic languag) -> asm.js because there's no type information to optimize with.

comment 13y ago · link · parent

I have a question for you since you have a lot of experience with async. Eventually node.js will have generators (when V8 implements ECMAScript 6) which should allow node.js to have something like gevent. What kind of effect do you think this will have on the node.js world?

comment 13y ago · link · parent

Just curious, what were the tradeoffs for profiling the Python code and rewriting slow parts in C vs total rewrite in Go? For high level languages, the usual argument has been to rewrite just the slow parts in C or some other low level language.
12345