Ask HN: What makes a job posting attractive? - <AUTHOR> While writing the job description for GazeHawk (P.S.-we're hiring PHP/Python/UX hackers - brian AT gazehawk.com) I realized that most job descriptions are generic and boring.
I'm wondering what attracts you guys to a particular job posting?
Do job postings even matter beyond that fact that company X is hiring?  Does a posting with descriptions of the company culture, future plans, values, etc actually mean more than "PHP/Python hacker for YC startup"?
Looking forward to your feedback! <comment><USER2> It's not just what makes them attractive, but also what doesn't make them suck.

The biggest turnoff is the sight of stringent, fascist language for benign requirements that can be met by anyone who bothers to do a basic preparation. " _MUST be able to come to an in-person interview. Do NOT apply if you can't come in_ " -- why is that even a requirement for an on-site job?

Other gems are:

Equating completely unrelated qualifications "Minimum: masters in computer science, or Red Hat certification".

Being sticklers for dipshit, minor-celebrity tools that anyone with half a brain can pickup on their taxi ride to the interview: "MUST be able to use JIRA/Trac/Redmine/Bugzilla; MINIMUM 10 years".

Offering me $30/hr, with no other benefits, while enticing me with the usual fare of juvenile delights: pop soda and foosball. Specially when you're the 40 y.o subsidiary of a Fortune 500 conglomerate.

Hiring for systems design or knowledge transfer, while insisting on specific tools to be used: "we need a consultant to advice us on global on-demand video advertising delivery, and recommend architecture and design insights .. MINIMUM 10 years Oracle. 10 Years Java. 10 years Perl. 10 years C++. 10 years Sybase. MS Office. Photoshop. Batchfiles" .. you can just tell whoever wrote this has no clue what the solution might entail, so he adds everything he remembers from MIS 101, and requires it all from the guy who will be most likely working with biz analysts and delivering nothing more requirement documents, and possible the first few job ads for the future team lead and project manager.

</comment><comment><USER3> * No time for bullshit, please just put the salary there. A range that is open to bargain is fine too. Prorated is fine too. We just want some idea as to how much you want us and how much we'll be making. No point beating around the bush. The 5k or so that you might lose from not having bargain space might actually turn a great investment if you end up hiring a better candidate.

* Don't list every technology you may or may not use as required in the job posting. Either post for a specific job or spell it out that you want a fast learner and wearer of many hats, and say "these might be useful".

* Don't _require_ X years of experience. This is as stupid as the drinking age limit: You aren't suddenly much more mature the day you turn 21. What does "experience" mean anyway? Experience in what? Spell out what sort of skills you need.

* What are we going to be working on? What is interesting about it? Hopefully it's something more intriguing than "building a blog engine" for the billionth time. It doesn't have to be cutting edge, but even the most seemingly mundane tasks can have interesting technical aspects if they are nontrivial.

* What sort of environment is it? Can I show up in my jeans and take a break during the day? Do you care what days / hours I work as long as I put in my 40h / week? What are my peers like? Are they young up and comers or grizzled bearded veterans of the unices? What sort of development process do you have? What points of the Joel Test (look it up) does your place pass?

<comment><USER4> Upvoted for the upfront salary listing. I've ignored many a job posting due to this. Let me know if it's going to be worth my time up front.

</comment></comment><comment><USER5> Realism. Nothing is more bothersome than buzzwords and bulleted lists of cross-disciplinary requirements that no person you would actually want on your team could fill.

Speak Human.

</comment><comment><USER6> attractive to whom? know your audience. even among HN members, there's a huge range of what "attractive" means.

figure out who you want to target, very specifically, then figure out exactly what they want out of a job.

The following is my paraphrase of dotBen's comment, with "if statements" instead of "dont's":

if you want people who care about degrees, require a degree.

if you want people who care about the exact number of years they worked at some job or with a language, add it to your requirements.

if you want honest down to earth people, then be honest and down to earth.

if you want people who are cocky enough to label themselves as "rockstars" or "ninjas", then ask for it.

... list goes on

I personally think this is common sense, but as they say, common sense isn't common.

 __The most important thing? Hiring is a two-way street. You're shopping for employees, we're shopping for employers. Your job description is like an employers resume. If you want honest applications, then give us an honest description of what you want. It would seriously MAKE MY DAY, if there was a job listing that said straight up what you were going to do, i.e.:

"we need someone to work with us on a team of 5 to implement our new web API within 3 months and provide support afterwards. If you suck, we'll fire you. If you're good, we'll move you on to whatever new stuff we might need help on like a potential mobile platform..."

at which point it would be very easy for me to say "yeah that sounds awesome! i can do that for you!" or "fuck that i got better shit to do." either way, we'll both get exactly what we want, and I won't be trying to fake my way into a job I don't deserve, and you won't be questioning whether I'm actually good enough.

</comment><comment><USER7> The top-rated comments have a lot of good info, but I'm going to boil it down for what I look for:

40 hour workweek. Overtime only happens during an emergency. That means you NEVER schedule overtime.

Accurate requirements and bonus skills. Don't ask for 7 years in a language that has existed for 4 years. Make it clear if experience in other languages is acceptable, and the candidate can get up to speed on a relatively new language on the job. For a good programmer, this isn't hard.

No fancy language. No 'rockstar' or 'code ninja' talk. Anyone who is realistic about their skillset will not call themselves that.

Flexibility in interviewing. Good programmers already have a busy life. If you want them, you have to work with them. Especially if they live any distance from your office. Be willing to interview via internet/telephone first, and have them travel only if necessary. (I once had a guy 3 hours from me ask me to a lunch interview. I declined because I figured he was just milking the company for lunch and had no intention of hiring me.)

Adequate pay. Benefits are nice, but they don't put food on the table. And with enough pay, employees can buy all the benefits I want. As someone said earlier, your foosball table isn't on my list of requirements.

Unit testing. Without unit testing, life is a LOT harder.

Don't play games. If you say you'll call someone back, do it. Don't wait for the candidate to call and 'ask for the job'. That means they're desperate, not that they're good or loyal. If an interviewer tells me that they'll call me, I hold them to their word.

The above are the absolute necessities. Below are things I like to see:

Languages/environments that I enjoy. If you deploy on Linux and run Ruby, those things interest me. Showing that you are on top of the newest technologies or methodologies means you are open to improvement. This is also good.

"Challenging". I hate boredom. I never want to be bored. I would much rather go home exhausted from all the thinking than have enough energy that I feel like coding at home. And I do code at home when I'm bored at work.

Telecommuting. I find that I don't choose to do this, but companies that trust their employees enough to do this are better to work for. It also probably means they have a way to measure whether someone is working or not that doesn't involve a rat. That means things are a little more fair.

<comment><USER8> Unit testing. Without unit testing, life is a LOT harder. Why don't people truly subscribe to this practice? It makes so much sense to put "bracers" around your work to insure its integrity. Check out this white paper if you want more information, I found it useful: [http://www.parasoft.com/jsp/products/article.jsp?articleId=2...](http://www.parasoft.com/jsp/products/article.jsp?articleId=2869&redname=unittestingwp&referred=UnitTestingWP)

</comment></comment><comment><USER9> A job posting is attractive if a friend who works at the company IMs you about the job, tells you how great it would be to work together, and then casually includes the link so that you can get some background information and feel prepared when you go in for your interview.

I always have trouble writing job descriptions because I feel like the default approach boils down to writing marketing copy for people who think job postings are full of shit. I bet, it'd be easier if I just put myself in the frame of mind of answering, "what information do I want the candidate to be prepared for when they come in for an interview?"

</comment><comment><USER10> A good start: show that you pass as many Joel tests as possible

<http://www.joelonsoftware.com/articles/fog0000000043.html>

</comment><comment><USER11> Actual salary range. Important. A "competitive salary" in 2010 for an embedded systems designer is not the 50th percentile for HTML coders from a 1996 salary survey. If you have incredibly specialized skills that you've been unable to hire for, competitive is going to be 6 figures and not the low end.

No long lists of very narrow technologies each which really only require a few days to get up to speed.

Brief description of work environment such as offices with doors that close, book account or some sort of library, reasonably modern computers with dual monitors each at least 1920x1080 plus a laptop, and no complaints about getting whatever text editor and tools the developer prefers to work with.

Relocation paid. If you are looking to hire someone who is good and with specific skills, he is not in your weird city nor does he wish to subsidize your cost of hiring.

Pay for cost of interviewing for final candidates that you need to come to site interviews. For those ones you'll want to sell the area as well since they have no idea why anyone would want to live there, wherever 'there' is.

Not paying the above two tells the candidate you probably won't be able to make payroll either.

Be very willing to receive screening calls that ask lots of personal specific questions and answer them enthusiastically, just like you are trying to sell an expensive item to a very important customer.

And finally, don't rely only on ads. For specialized skills you need recruitment, and there's no way to figure out who you want to woo unless the recruiting is done by someone who knows development, not some know-nothing recruiter from an agency, nor some HR drone. Again, recruitment has nothing to do with recruiters. Recruitment is saying you need someone with the ability to build System X, then you find someone who is already doing that and pay him $20 million to buy his company as a talent acquisition.

I am no longer an employee but an owner. When I was an employee I looked at ads but found them useless for many of the above reasons. As an owner I write ads and do recruitment and we have little difficulty hiring exactly the talent we need. Pretty much all companies that have problems finding talent aren't offering enough money and are not good places to work in many ways. Places that pay competitive and are good places to work have no shortage of highly qualified applicants. Yes, you'll also get a lot of unqualified applicants, but how to tell the difference is a topic for another day. (In short, if you can't tell the difference you're doomed since you'll hire a bunch of duds and then the few with actual talent will leave because of the clustering effect: very talented people hate to work with idiots.)

</comment><comment><USER12> It's actually a _huge_ plus for me if the company takes the time to put a novel programming puzzle in the post. It says a few things:

1\. this wasn't posted by a recruiter or somebody clueless in h.r.

2\. engineers at this company still care about hiring

3\. a lot of buzzword bombing b.s. artists aren't going to be applying

4\. the company recognizes that raw aptitude is more important than bullet list bingo

In other words, it's a sign that the engineering culture is probably still healthy at this company.

<comment><USER11> The puzzle question is an interesting one. I like solving puzzles, that's why I am an engineer. Based on this I used to think that puzzles are a good thing for posts and interviews.

In practice, it almost never works out very well. Puzzles are incompletely specified, impossible to answer unless you guess at assumptions that are sure to be wrong, or they take so much time to solve it's just not worth it.

Usually companies don't need complex puzzles for screening anyway. Something rather trivial and quick to answer like the fizz buzz problem eliminates 90% of the dud applicants anyway.

<comment><USER12> I'd never heard of the FizzBuzz problem before. Just looked it up. Do people claiming to programmers really struggle with it? That's disturbing if so.

Designing a good problem is hard. Something that's difficult enough to present a challenge but easy enough to be solvable by a good programmer in ~15 minutes or so takes some thought. But this is another reason why I appreciate a _good_ programming problem in a posting.

<comment><USER11> No, they don't struggle with it. More of a blank stare. They have absolutely no idea what to do or how to get started, unless they happened to have seen it on a "famous programming questions" board and memorized a plausible answer character by character.

If you do a decent job of publicizing an opening you'll can easily get 1000 resumes. If you narrow this down to what seem to be the top 20, 18 of those won't be able to write a simple loop in the language of their choice. Part of the reason for this phenomenon is that the best developers who applied were in the 980 resumes discarded (this is in part due to unreasonable expectations on the hiring side and outright fabrication on the applying side).

But the general idea is that the same duds apply to every job. If you post a job ad for a terrible job with unreasonable parameters, then 100% of the applicants will be the duds as everyone with any sense reasonably ignores the ad. The more reasonable and realistic the ad, the more potentially qualified candidates will apply, but this number is not going to be the majority of applicants. The majority will be the non-english speakers and DeVry Institute grads who are mass spamming every job ad they can find with bogus resumes.

There's no point to starting with a challenging programming test because the interviewer's idea of obvious common sense insights is typically some highly domain specific thing that only is known at the particular company. Or even worse, the "challenge project" which will take a week to finish and is obviously a real work project for the company that they want done for free. Furthermore, interviewers seldom have any realistic idea of what could really be solved in 10 minutes by someone who hasn't seen the problem before like the person who selected it. FizzBuzz like problems are again the answer. Ask to reverse a string without calling a library function. This is a reasonable 10 minute question. If 95% of applicants fail, then this is a very useful screen is it not.

</comment></comment></comment></comment><comment><USER13> Random thoughts from when I write job reqs:

Make sure there is a clear description of the job itself and what the challenges the company and the role itself are trying to solve ("Looking for Ruby on Rails devs, call us!" doesn't explain what problems you'll be solving, etc). _GOOD_ developers don't look for a new job using X, Y and Z languages, they look for a new job tackling problems A, B, and C.

Don't include requirements that are superfluous, unless you can really justify them. "Must have 5 years experience" - why? I know devs with 2 years experience that will kick the shit out of a 10 year vet. "Must be capable to lead a small dev team" or "Experience with several discrete projects a must to be able to advise from experience on architecture choices" is better.

Ditto with CS degrees: don't mandate one unless there is a good reason.

Be clear yourself with what the role is going to be: are you looking for an engineer or a support guy, dev ops, etc? "Spray and Pray" is not a strategy and looking for that experienced engineer who is fluent with UX and design while also able to administrate the production servers and load balancers is going to net you people who know nothing about anything.

State the current stage + status of the company "pre-funded", "series a funded", "profitable". Different people are attracted to different stages (and the risk that goes with them) so be clear in the job req to pre-filter those who are not. An engineer with a wife and two young kids is unlikely to take your job at your pre-funded startup so be clear where you are.

Don't use words like "rockstar", "code-ninja" or guru. You come across looking like a dick - and far worse, that I might actually end up working with someone who really thinks and behaves like he is a "rockstar" because he was hired as one.

Be clear with your methodologies, coding practices (pair programming, peer code review, etc) and anything else that will make you look attractive. Consider getting some before you post your ad if you don't currently have any (why do I want to go work in chaos?).

State where you are located, and not just "San Francisco" (for example). Mention the neighborhood or even the building. People living in East Bay are going to want to know if they can BART in, South Bayers will want to know how bad the drive will be ONCE they get into the city/if they can CalTrain and even locals are going to turn their nose up at your Outer Sunset location if they're paying through the nose to _live_ in SoMa. I also want to know what kind of community there is around my potential work place ("We're in Twitter's building", "we hang out in South Park most lunchtimes"). Also state if telecommute is an option.

Don't forget to mention benefits (or state if there are none yet) - even geeks in their mid-twenties want to know if you are going to cover their dental. Same for stock, you don't have to mention remuneration specifics but be clear if the remuneration will include stock, and be especially clear if you are looking to offer a package that is "equity heavy" (ie below market $ salary). Again, this will filter out people who are not suitable for that situation and manage expectation of those that enquire.

Include photos of your work place, even if you just have basic digs (which is fine if you are early stage) You can tell _a lot_ about a startup and a job from looking a their offices.

Don't use recruiters. Do I have to explain why?

 _But my best tip of all_ :

You/your founders should be spending a large amount of your time curating your network such that you don't need to put out job reqs because you can simply hire from your network.

Also don't be afraid to simply identify developers in existing startups and reach out to them directly - they may not be actively looking but will entertain your interest (and perhaps) subsequent job offer. Even in this economy (in Bay Area, at least) good developers are seldom out of work so be prepared to poach rather than search the job seeker pool.

<comment><USER14> Most of this is good except for the: don't use rockstar and other terminology. I don't behave like a rockstar but I often look for that as an indicator to apply since at least I know that I would be valued there. It's not so important to use it, but if you are truly looking for a guru (and most other people have failed the technical requirements so far) then it doesn't hurt to post it.

<comment><USER15> I think it does hurt. Especially in startups when you'll be working absurd numbers of hours and spending an incredible amount of time with these people I'd prefer the slightly-less-talented-but-very-good to the absurdly-brilliant- but-completely-intolerable. I definitely glaze over the word "rockstar" at best. Besides, I would think it goes without saying that anywhere I'd seriously consider working would expect all their employees to be damn good at what they do.

<comment><USER16> Agreed, I actively avoid people who thing they are as it's synonymous with "arrogant twat" and getting things done is about team work, not prima donnas.

</comment></comment></comment></comment><comment><USER17> First, I look to see if the work interests me (not giving a description makes me unlikely to continue). Then I look to see whether it is a reasonable (not necessarily perfect) match with my skillset and availability. Any posting I see that meets the above will probably convince me to look into it further. Relocating, even temporarily, does not bother me, though it is nice to know the location in question.

 _Do job postings even matter beyond that fact that company X is hiring?_

Yes. A single company probably has some (perhaps a lot of) variety in the positions for which they're hiring and the work they'd give to the new hires.

 _Does a posting with descriptions of the company culture, future plans, values, etc actually mean more than "PHP/Python hacker for YC startup"?_

No. I've seen it in a couple postings and pretty much just skimmed over it and got frustrated that I couldn't find the information mentioned earlier, but "PHP/Python hacker for YC startup" doesn't really get my attention either.

</comment><comment><USER18> For me, it's not what attracts me, but what turns me away.

For example, if I'm looking for a Python job, than any job regarding Python is of immediate interest. That's all that's necessary on the attraction side of it.

Things that keep me from applying for jobs are, in no particular order: using the word "Rockstar", mentioning how difficult things are or how quick they are, mandating requirements that don't really matter (college degree required! skill not important), vague details, trying to sound too cool or fun to work with.

My advice would be to sit down with someone else there and tell them about the job. Tell them what you're looking for, what you offer and any important details. Actually have a conversation with them about this. Record it. You'll have the basis for an honest job post in conversational tone that tells potential employees exactly what you want.

</comment><comment><USER19> I personally look for a neat collection of tasks that I would be performing as well as a required skill set that I actually have. I used to really want to do telecommuting, but have since backed out of that desire since it tends to give your fellow employees license to frown at your ability to not have to be in the office. I also like posts that are not a generic list of incomprehensible gibberish. I will say that it seems even the most bland-sounding of companies have 11/12 these days on joelonsoftware. What's that all about? Has every company become "that company"? I joke of course. All tangents aside, these are the kinds of things I look for.

</comment><comment><USER20> I wrote about this a while ago here: [http://www.deserettechnology.com/journal/writing-a-good- job-...](http://www.deserettechnology.com/journal/writing-a-good-job-ad-for-a- programmer)

</comment><comment><USER21> To incent right job seekers to respond, I think it's a function of making it interesting on 2 fronts:

1\. The job itself - Will the person be solving or doing interesting things? 2\. The company - Does the company have a clear vision and seemingly a chance of success? Evidence of traction here can help, i.e. being a YC startup, press, etc.

I think gimmicks and attempts to make a job description "stand out" through wit, humor, etc may work, but they don't always register with everyone and can miss altogether at times. Not worth the risk (esp as as a first attempt IMO)

</comment><comment><USER22> Some things good programmers care:

* good engineering practices (as all those described in books like "Pragmatic Programmer" and "Code Complete": code reviews, unit testing, continuous integration, coding standards)

* tools worth respect (e.g.: subversion, git or mercurial but not Visual Source Safe)

* a well defined development & project management methodology, agile or not (e.g.Scrum, RUP), instead of clueless project managers.

* a concrete problem/puzzle in the company website to filter out bad candidates

* respect for the developer private life; i.e: what to expect in overtime work

</comment><comment><USER23> Marissa Meyer has a funny story on this:

<http://ecorner.stanford.edu/authorMaterialInfo.html?mid=1526>

</comment><comment><USER24> Answer these questions:

\- Who are you?

I need to research a company before I send you my work DNA (a.k.a. resume`). Are you a spammer? Are you some recruiting company building a resume`s database?

Be honest and avoid snake-oil salesmen terms like "Company in the bay area with a huge upside". If I work for you, I have to believe in your vision as much (if not more) as you do and I can't do that without doing due diligence and researching your company.

If you are not well established yet, then a brief description of what you do and what your vision is always helps (in your case, a link to your site should suffice).

\- What do you need from me? / What does your technology stack look like?

Be very specific about must haves and "would be nice"es. You can discourage a lot of potential candidates by putting a laundry list of technologies that you're thinking about (or worse, toying with the idea of) implementing in the future but are in no way what you need from a candidate right now.

\- What is your compensation package?

Not always feasible to write in detail, but putting a salary range is a huge plus. A phone interview + a couple of on-site interviews (taking time off of my current job) to be told that your maximum offer is worth $20k less than what I make right now is a waste of everyone's time.

Aside from that, everything else is just fluff in my opinion. Good luck!

Edit: Formatting. Where's the preview button?

</comment><comment><USER14> 1\. Talk about what you'll actually be doing, both in terms of both technology and the projects. Most of the time this has to be guessed from vague technical "requirements" rather than offered up freely. If you can show genuine enthusiasm for your work that is fantastic, but don't fake it because that is also obvious.

2\. Be up-front about the upsides and downsides. If programmers get full control of their workstations and get to pick what environments to use, then say so. If they are expected to work 50 hours every week, say that too. That's how you'll attract the right people to come interview.

3\. Putting your answers to the "Joel Test", if you score well, is a good way to attract the right people.

I also have to self-promote a second and point out this: [http://www.codeanthem.com/blog/2010/04/how-to-hire-crappy- pr...](http://www.codeanthem.com/blog/2010/04/how-to-hire-crappy-programmers- the-job-post/) which is the anti to what you're asking for - but probably worth a read and make sure you're not doing any of the ones listed in the post or the comments.

</comment><comment><USER25> Hiring has to be pertinent to what you are doing...

For me "equity" or "equity plus small amount of cash" generally means you are looking for volunteer labor. I've done a bit of this, but generally most postings of this nature are of the "we want you to work for free" nature.

I avoid them.

</comment><comment><USER26> I've seen a lot of people asking for a description of the problems the position will be addressing. Discussions with clients over the past couple of years have led me to understand that in _some_ cases, companies don't put out many specifics because what they want you to work on is a bit of a competitive advantage (in some cases this is even justified). Letting your competitors know you're hiring to build system XYZ to do ABC gives them a heads-up as to what's coming down the line.

Granted, this isn't the case in all or even most postings that are vague. But if other aspects look legit, but the posting is a bit vague, give them a little 'benefit of the doubt'.

</comment><comment><USER27> I look for the language stack I'm prefer (because I chose it for a reason), and a business model that seems sane and interesting.

Phone interviews are pretty cheap, and a quicker way to see if cultures / values / etc. line up, imho.

</comment><comment><USER28> Random bits:

\- What company the job posting is for. There's a surprising number of job postings missing this tidbit. It might be fine in a job hungry market, but it's never been fine for me and I usually ignore these postings.

\- A real description of the duties. What do you actually want me doing? Will I be working alone or within a team?

\- What tools will I be using? It's alarmingly common to go into a job posting for J2EE and find out they're really migrating to .NET (or vice versa). I know a hell of a lot of programming languages, but I've truly mastered only a few.

</comment><comment><USER29> * Set a challenge. What do you want that employee to achieve in the time that they're with you?

* Lay out the opportunity. How can they develop and what will the rewards of success be?

* Tell a story. How can a potential employee find out about the role and the company culture in an engaging way?

We included all three of the above when we wrote a recent job posting for a managerial position, "Searching for a Superhero": <http://brightone.org.uk/searching-for-a-superhero/>

</comment><comment><USER30> I think it's much different for established companies vs. unestablished companies. As someone at a startup which hasn't launched yet, we have to be more descriptive. If you're YC company, or more established - maybe it's enough to say Acme Corp, PHP, email us.

We like to say:

Funded startup looking for a talented Ruby developer to be employee #1 (because that's true, and because there's something unique about being employee #1).

</comment><comment><USER31> Some of TechCrunch's postings have been real winners. Although I probably wouldn't really want to go there, they usually seem to care more about the candidate's passions than their experience and education. I'm sure once you get into the hornet's nest for the face-to-face, the team will grill you to smithereens to see if you can hang with them or whether you're just blowing smoke.

</comment><comment><USER32> I have to admit, I like greplin's job posting: <https://www.greplin.com/jobs>

</comment><comment><USER33> 40 hour work week.

<comment><USER34> With managers actively encouraging employees to go home to their families.

</comment></comment><comment><USER35> We recently created this job ad which you may find useful? We tried to make it sound interesting and convey that it's not all about the money, but also quality of the working environment.

<http://www.engageinteractive.co.uk/recruitment.php>

Cheers,

Alex

</comment><comment><USER36> I wrote this <http://use.perl.org/~Adrian/journal/33295> a few years back on how to not write job adverts. I still mostly agree with it :-)

</comment><comment><USER37> Let people email a resume to apply. Don't make people fill out a 20 minute form that requires retyping your resume. And if you do have such a form don't make "desired salary" a required field.

</comment><comment><USER16> My views on rock stars .......

[http://www.jeremyhutchings.com/2009/12/rock-star-vs-rock- sol...](http://www.jeremyhutchings.com/2009/12/rock-star-vs-rock-solid.html)

</comment><comment><USER38> DesignModo Jobs - Freelance designers, developers, photographers, artists <http://jobs.designmodo.com>

what do you think?

<comment><USER39> I think it has very little to do with the original question.

</comment></comment><comment><USER40> What do you guys think of <http://www.extrahop.com/jobs/> ?

<comment><USER12> I like it. Straightforward description, realistic requirements, an interesting but not unreasonably difficult programming problem, and an appeal at the end to lore probably not possessed by any but the genuine geek.</comment></comment>


Ask HN: How do I program with more discipline and less emotion? - <AUTHOR> I'm used to being a hacker. I like doing 48 hour programming "binges". These were incredibly effective and I could often build more in those 48 hours than most people would build in a month.
It worked great when panicked, but as I get more senior and used to the heavy pressure, it doesn't work any more. I have a more comfortable life now and failing projects is not as bad as they used to be. So it's hard to dig up the emotion I used to hack long hours. Now I just end up staring at the code for 2 hours at 2 AM.
Besides, exhaustion kicks in and makes me less effective in the long run. And it doesn't scale as well with a team.
I find disciplined techniques like Scrum and XP appealing. I know I should start adopting them. But a part of me worries that my hacker spirit would die out.
So how would I go from being a code berserker to being a more organized, disciplined, professional programmer? <comment><USER3> Productivity isn't about writing lots of code.

For example: if you spend 48 hours writing 10,000 lines of code, and then I produce same functionality in a normal 16 hours of work, with just 1,000 lines of code. Who is more productive?

So instead of focusing on writing lots of code, focus on solving problems. The less code it takes to solve a problem, the better off you are, because that's less code to maintain.

This attitude (explained in more detail here: [https://codewithoutrules.com/2016/08/25/the-01x-programmer/](https://codewithoutrules.com/2016/08/25/the-01x-programmer/)) then leads inevitably to the idea that working long hours isn't actually useful, nor is working at 2AM a good idea. The best way to be productive is to _think_ , and that is easier when you are well rested, and works better if you take breaks and go do something else ([https://codewithoutrules.com/2016/11/10/work-life-balance- so...](https://codewithoutrules.com/2016/11/10/work-life-balance-software- engineer/)).

<comment><USER4> I quite like the point of the article but I have one issue with it.

It begins by focusing on "producing times ten" and then goes on to equate that with "lines of code times ten".

The issue with that is lines of code isn't production. The real production is the value behind that code. If you do the same thing with a tenth of the code, you _are_ producing ten times more.

<comment><USER5> both of your comments reminded me of the 'the parable of two programmers' [0] (not original). While I disagree on the concept described that each programmer was 'productive' in writing 'lines of code' I think that the lesson learned is more about approach and how solutions should be evaluated.

[0] [http://www.bruceblinn.com/parable.html](http://www.bruceblinn.com/parable.html)

</comment></comment></comment><comment><USER6> I also used to love "binge programming", a kind of hyper-focused/obsessed productive phase, but I totally agree that it gets exhausting with age and not sustainable in the long run. In fact, for me it creates occasional but fairly regular cases of burn-out. I'm still learning to become a more disciplined programmer.

These days I'm trying to "stretch out the binge", so it's less extreme ups (and downs), rather a more long-term sustained focus and interest.

I'm in no position to give advice, but part of your solution may be emotional and intellectual engagement with the process of programming, the tasks at hand and the problems to be solved. Also, as a programmer, you might enjoy building such a system as Scrum/XP/etc. that suits your situation best.

<comment><AUTHOR> Actually, I might just end up building my own system. I'm surprised that solution never occurred to me, as I've been trying hard to squeeze existing methodologies into my life and it doesn't work.

I've had a lot of admiration for military techniques and how they train people to get past fear and drop bad habits. I'll probably adopt a mix of XP and some military techniques.

</comment></comment><comment><USER7> One of my main complaints about cs in university is that they didn't teach how to put their effort and energy into their projects in a healthy and sustainable way. Many students ended up learning the 'magic binge' approach you're talking about.

It depended on that seemingly random lightning bolt of inspiration combined with almost manic mental energy to work crazy hours to get it done. If you've ever worked through the night, met someone who _expects_ future crunch times (aka. binges), or put off working on something important because you just weren't feeling it right now, then you know what I'm talking about.

The closest analogy I've found is writing. Experienced professional authors most commonly give out the advice to work on it consistently, every day, whether you're feeling it or not. I feel like that heavily applies to programming too. If you care about a project, for work or for your self, you've got to make it part of a routine. Pick your days and time that you're going to work on it, then sit down and work whether you're super excited and have 'flow' or not. I think that after a short amount of time each session, you'll find you are creating the inspiration rather than waiting for it to find you.

<comment><USER7> A few, more concrete, ideas about _how_ you might reduce emotional Bing coding:

Experiment with coffee. Most commonly I see bingers drinking a LOT of coffee, that's what fuels and in part causes the binge. If that's the case, try going to zero coffee and then every other day, try increasing your coffee intake just a little, with a rest day of no coffee in between, until you find out what actually works best for your productivity. You're looking for optimally consistent, not max output in one sitting. It's got to be consistently repeatable.

Try meditating. I recommend the app headspace if you've never done it. Basically a large part of meditation is deliberate awareness of your thoughts and emotions, the goal being to better understand yourself and what makes you tick. If done consistently, it seems to help people guide their thoughts and emotions in a positive way, which can really help with something like programming.

Exercise. We all know the benefits, a zillion studies have shown it helps you feel motivated, relaxed, improves mood, and think clearly. Seems helpful to me.

Decide to take the pressure off of each work session, regardless of what's going on. Even if it's crunch time and the sky is falling, tell yourself this is not the be-all end-all, that you won't remember this in 5 years let alone 20, and to relax. _Choose_ to be calm, and just focus on making the project a little bit better than when you started.

Go for walks. I separated this out from exercise, because the best benefit of walking is that it takes very little thought, freeing up your brain and giving it space to run around. Sometimes I just let it go bananas, the equivalent of a dog zooming around a back yard. Other times, I'm just washing out everything else by listening to a podcast or an audio book. Or, just putting on music and letting myself feel more and think less. All of these are like a pressure release valve for your mind.

Make a list. Follow that list strictly. Nothing is less emotional than a cold hard list. Not something I recommend all of the time, it can make your thinking rigid, but a very simple and effective tool when that's what you need.

<comment><AUTHOR> I've done all of these.

Coffee - it consistently works, more so if combined with L-Theanine.

Meditation - doesn't help. I've tried headspace, TM, many of the apps. Part of the problem is that it does chill me out, which makes me unproductive. The main benefit is after meetings, where I usually get pissed with coworkers.

Exercise/walks - it feels good, makes me think better, but the data shows no change in productivity. I've been doing med-high intensity exercise for nearly a year.

The list - really the only one that works. The only real problem is when something in the schedule forces me off. I've been modifying it heavily this last week. It's full of if-else statements now, lol. I might just end up putting it in an app to command me what to do, based on the daily situation.

</comment></comment></comment><comment><USER8> When I get overwhelmed and feel that tension that comes from digging in to a new project here are a some things I do.

1\. Schedule clear time to work on the project - I want to be intentional with my time so there is no ambiguity on what I should be doing. ex. 9AM - <USER2> work on this feature

2\. Win the war before going to war - A lot of the time, procrastination stems from not being clear of what exactly needs to be done. The task is either very complex or simply not clear. Cognitive complexity is the precursor of inaction. So before I start I try to describe what exactly I'm going to do before I even open my IDE. For example, 1. Get the requirements, 2. Create a flowchart of the data, 3. Describe what I think would be the best approach.... etc

I'll even drill down to actual classes and methods I should be making. This really helps get me unstuck

3\. I have 5 truths of work that I remind myself of. Here they are

1\. No where does it say that work must be easy for me to do it 2\. No where does it say that work must be enjoyable for me to do it 3\. This work is important 4\. You don't have as much time as you believe 5\. Your self worth is not determined by the success/failure of this so just attack

Those are some of my personal methods but in the end, it's about experimenting and finding what works for you.

Hope this helps

</comment><comment><USER4> Emotion is what makes you strive to do a good job. Caring is an emotion and caring about your work is an important quality to have.

Which would you prefer? A programmer that knocks out am untested Italian food stuff thousand line function or a programmer that takes care to structure the code such that it's well tested and factored?

</comment><comment><USER9> You have the opposite problem. You need more emotion. It's the emotional connection to your work which enabled you to go on those binges. With no emotional connection, you wouldn't be driven to do any programming at all, let alone in binges.

<comment><AUTHOR> I mean I'm reaching the jaded, cynical senior programmer attitude where I just can't muster up the emotions. There will be a few, but not quite the extreme, startup mindset. So I'm looking for a way to migrate to a style where I can do without them.

<comment><USER9> Look for a different job? Work with a different team? Change your mindset from programming focus to a customer story focus? Start your own business?

If you don't feel driven within the environment that you're in, maybe it's time to look somewhere else. Or maybe it's okay not to go on these binges. Maybe it's best to scale back and put some of that energy into something else, like family, hobbies or whatever else might capture your interest.

Since we only get one shot at this, I think it's more interesting to change things up. We don't need to walk the same tired ground. There's always new territory to operate on. New challenges. Maybe your current situation is your gut telling you that you need to start working on different metrics rather than raw programming output.</comment></comment></comment>


RTCode - Real time code sharing web application - <AUTHOR> https://github.com/gsilvamartin/RTCode <comment><USER2> Seems to not be working for me, I get

        TypeError: result.data is undefined

on

        file-tree.js:54:24.</comment>


Show HN: Generate text using a NN, or train your own of any size on any text - <AUTHOR> https://github.com/minimaxir/textgenrnn?hn=1 <comment><AUTHOR> The first iteration was submitted to HN 8 months ago ([https://news.ycombinator.com/item?id=15049549](https://news.ycombinator.com/item?id=15049549)), but this is a substantial 1.0 release with many user-requested features, and a substantial performance improvement.</comment>


Startup Quote: Dave McClure, founder, 500 Startups - <AUTHOR> http://startupquote.com/post/1520974581

<comment><USER2> I am not usually one to bitch about a lack of social media integration, but this definitely should be something integrating into my facebook/twitter streams.

<comment><AUTHOR> What do you mean?

</comment></comment><comment><AUTHOR> That which does not kill you makes you stronger.

\- Dave McClure (@davemcclure)

<http://startupquote.com/post/1520974581></comment>


C# in browser with WebAssembly - <AUTHOR> https://www.youtube.com/watch?v=MiLAE6HMr10&t=26m52s <comment><AUTHOR> The section on C# and WebAssembly is particularly fascinating, but the entire talk is extremely well done and interesting.</comment>


JavaScript Quiz Set - <AUTHOR> http://blog.bolshchikov.net/post/40917260776/javascript-quiz-set

<comment><USER2> Interesting. I just started this, and came back here to post this.

The third question - "Global Variables Intro" in the "beginner" (one by <http://madebyknight.com/javascript-scope/>) is not quite right.

      function() {
          a = 3;
          alert(a);
      }

is _not_ the same as

      var a;
      function() {
          a = 3;
          alert(a);
      }

Whenever you don't declare a variable with a _var_ , it does not become a global variable, rather, it becomes a property of the global (or host) object.

The main difference here is that you _can_ delete a property -

      delete window.a;

But you can't delete 'a' if it were defined by _var_.

In the same light, the following statement (IMO) is incorrect.

      When Javascript comes across a global variable, it needs somewhere to put it. It needs somewhere that everywhere else on the page can access. So, it uses the window object.

Still working through the tutorial ...

Edit - Copy pasted the wrong sentence from the quiz. Sorry

<comment><AUTHOR> Global variables are in fact properties of the global object. In web pages the global object is window, so you can set and access global variables using the window.variable syntax. [https://developer.mozilla.org/en- US/docs/JavaScript/Guide/Va...](https://developer.mozilla.org/en- US/docs/JavaScript/Guide/Values,_variables,_and_literals?redirectlocale=en- US&redirectslug=Core_JavaScript_1.5_Guide%2FValues%2C_Variables%2C_and_Literals#Variables)

</comment></comment><comment><USER3> I guess some of this knowledge is helpful or necessary for people who want to know JS inside-out. Nevertheless, none of that code looked like anything a programmer would write if they respected readability and conveyance of code. Maybe I'm just taking things too seriously here...

A code snippet like the following wouldn't make me ask how it works, but it would make me want to find the person responsible for putting this snippet in production code:

var num1 = 5, num2 = 10, result = num1+++num2;

(I'm probably thinking in this manner these days because I'm currently in a situation where I'm maintaining someone else's code instead of building something.)

<comment><USER4> The above example is at least academically interesting since you can reason through it with a bit of programming experience and intuition about operator precedence.

        Does plus or pre/postfix increment have higher precedence?
        Probably increment.
        Does prefix or postfix have higher precedence?
        They're probably the same -> evaluate from left-to-right.
        Code is equivalent to num1++ + num2;

But the examples like "what is the difference between substring() and substr()", "What is the lowest cross-browser increment that [setInterval()/setTimeout()] can accurately use" is just trivia and is boring.

<comment><USER5> You also need to know how tokens are produced by lexical analysis. It could have produced:

      'num1' '+' '++' 'num2'

In fact it produces

      'num1' '++' '+' 'num2'

so it's not about _evaluate from left-to-right_.

<comment><USER4> Is there a case in JavaScript where operators with the same precedence are not evaluated left-to-right?

<comment><USER5> I don't know. But I happen to know that the javascript tokenizer matches the longest possible substring. Therefore it takes '++' from '+++..', not '+'. It's not about precedence.

EDIT: Yes, the assignment operators, =, += etc., evaluates right to left.

</comment></comment></comment></comment></comment><comment><USER6> [SPOILERS]

I got tripped up by question #5 of one of the expert quizzes [1] due to a difference between ActionScript 3 and JavaScript [2].

In AS3, `(a).b` is equivalent to JS's `(null, a).b`. That is, the `this` binding is lost in AS3 (but not JS). I thus thought the anser was "20, 10, 10, 10", and not "20, 20, 10, 10".

AS3 is _not_ a superset of ES3 as most people believe.

[1] <http://dmitrysoshnikov.com/ecmascript/the-quiz/>

[2] I have been working on an AS3 compiler lately, which is why I mixed JS and AS3.

</comment><comment><USER7> From the answers to the first intermediate quiz:

        // These are functions
        // used as closures...

        // This is good
        (function() {
          var foo = 'bar';
        })();

This, to me, seems an odd use of the word closure. Since no value is "closed over" with a function in the internal scope and preserved, it is simply an anonymous function being immediately invoked.

That said, these quizzes are a good way to learn but man does JavaScript have a lot of traps.

</comment><comment><USER8> Second example, "function scope"

"Based on knowledge of several other languages (such as Java or C), this would certainly be true. However, Javascript doesn't change scope when entering if statements, loops, or anything like that, really."

Dude what the hell?

In Java and C, 'if' blocks don't have their own isolated scope either. The equivalent Java or C code would also work perfectly fine.

<comment><USER9> No, you're incorrect, C and Java do have block scope. It would have taken like 5 seconds to verify that. In C:

        #include <stdio.h>
        int main() {
            if (1) {
                int a = 5;
            }
            printf("%d\n", a);
            return 0;
        }

==> test.c:6: error: 'a' undeclared (first use in this function)

<comment><USER10> In older versions of C that was the only way to declare variables in a function after the first non-declaration statement.</comment></comment></comment>


Apple Q2 Results - <AUTHOR> https://www.apple.com/newsroom/2019/04/apple-reports-second-quarter-results/ <comment><USER2> > The Company posted quarterly revenue of $58 billion, a decline of 5 percent > from the year-ago quarter, and quarterly earnings per diluted share of > $2.46, down 10 percent.

So they are shrinking, not growing.

<comment><USER3> Remove China from their numbers, and they are growing.

China's economy is still cratering.

<comment><USER4> Removing China for a company that depends strongly on sales in China may not be a very sound analysis.

<comment><USER5> Where does Apple "depends strongly" in China.

Sure is important for the iPhone, but it's not important for the iPad, Mac and Services.

<comment><USER4> Apple depends strongly on iPhone.

<comment><USER5> After a 30% drop in units sold (Independent data from IDC 1), Apple revenue was only hit by 5% in revenue 2.

1 [https://www.macrumors.com/2019/04/30/apple-36-million- iphone...](https://www.macrumors.com/2019/04/30/apple-36-million-iphones- shipped-q1-2019/)

2 [https://www.apple.com/newsroom/2019/04/apple-reports- second-...](https://www.apple.com/newsroom/2019/04/apple-reports-second- quarter-results/)

</comment></comment></comment></comment></comment></comment><comment><USER6> They're fine. But stock buybacks and dividends are a waste. I'd rather that money (I'm a shareholder with not enough shares to matter but oh well) be used to purchase companies like a Netflix (too late now of course) or a Disney (also too late) or making bigger purchases to control more of their supply chain like buying a Qualcomm or increase the R&D budget by double maybe. 75B in buybacks just juices the EPS numbers. It's the exact same BS that IBM has been doing to keep wall street happy. And it seems very un-Apple. I'd rather Apple take a more cold stance toward shareholders like Steve did and just act like the company was constantly in the verge of failing and keep making bigger bets (having huge piles of cash helps with that and they still do it just I don't care about a dividend! Find me the next thing better than an iPhone)

<comment><USER7> I disagree. Apple is a very capital efficient company and already spends a tremendous amount on R&D.

Just like the concept of the mythical man-month, the marginal utility of investing additional money in r&d goes down as r&d spend goes up. Or to put it a simpler way, Apple is running out of effective avenues to invest their money.

The correct move in that situation is to return the capital to shareholders, and stock buybacks are the most tax-efficient way to do so, with the added benefit that if the stock is undervalued (and Apple's certainly has been in the last few years relative to free cash flow), then the shareholders get an "extra" return on top of that.

Don't get me wrong, Apple should absolutely invest in R&D...which they do. They're not pinching pennies, except in situations like the keyboard fiasco, not including adapters etc - but that's a separate issue.

Absolutely the worst thing they could do is just go acquiring companies that don't actually fit with their business model. Remember that it takes human effort (meaning cognitive expenditure) to run a business, and getting side- tracked with non-critical businesses is absolutely antithetical to that. If/when Apple does find a company that has something unique for their situation, then they do acquire them.

<comment><USER8> > marginal utility of investing additional money in r&d goes down as r&d spend > goes up

This would be true if there are no new products with huge potential to explore. I strongly believe any company's future depends on diversification. Your old products will eventually start becomming commodity with margin race to the bottom. Companies like Apple needs to come up with new product line every two years. To get one new product out, you need to invest in R&D for may be 10 internally because other 9 won't pan out. For each new product you eventually got out, most likely half might not show promise longer term to become big. So you are probably left with 1 big product coming out every 4 years and at the same time your previous big product that is ~12 years old starting to become low margin commodity. Apple is certainly doing great by putting out series of new products at predictable schedule but I think this could easily be twice of current rate given the untapped potential in so many areas.

<comment><USER9> They have a much more diversified _profit generating_ portfolio than either Google or Facebook.

</comment></comment></comment></comment><comment><USER10> From the financial statements, revenue from Wearables, Home, and Accessories was _up 30%_ vs the last year. There wasn't a huge release this quarter (aside from the AirPods refresh which was at the edge of the March 30th cutoff), so I wonder why it went up so much.

<comment><USER11> I was shocked by how much the Airpods cost, and yet still ended up buying a pair. Have been absolutely delighted. I guess I wasn't alone!

<comment><USER12> I still don't understand the appeal, nor how they suddenly became a meme in 2018, two years after they were released!

I own multiple pairs of wireless headphones but the fear of losing 1 headphone in the Airpod pair terrifies me.

<comment><USER4> Keep them in your ears or in the case and the probability that you'll lose them will be pretty close to zero.

<comment><USER13> The AirPods are the one thing I actually lose (and I've lost a number of times). But I always manage to find them eventually.

The fact that I can't send a sound to them (somehow) when the case is closed is moderately insane. All it can tell me is that they were somewhere near my house when I last used them. That doesn't help me understand where they went to after I put them back in the case and misplaced the case.

<comment><USER14> This is also my only major complaint (I otherwise love them enough to have upgraded to the new ones when they were released). I would love for the case to be able to beep when pinged by Find My iPhone. Presumably there's cost involved in adding Bluetooth to the case, or adding some kind of communication from the pods to the case, but if it's in the < $50 range I'd probably be ok with it.

</comment></comment></comment></comment></comment></comment><comment><USER15> Share repurchasing of that magnitude doesn't seem like a good sign to me. I am interpreting that as meaning they could not find anything better to do with that money. If they were problem free and executing perfectly, maybe that would make sense. But that's hardly the case.

<comment><USER16> This is not a new strategy[0] for Apple or in general.

"That is a reduction of 21 percent in shares outstanding since 2013. What's that mean? It means all other things being equal, the company's earnings per share are 21 percent higher than they would have been had it not done the buybacks."

[0] [https://www.cnbc.com/2017/05/03/apple-has-been-a-buyback- mon...](https://www.cnbc.com/2017/05/03/apple-has-been-a-buyback-monster.html)

</comment></comment><comment><USER17> AAPL up by 10pts (~5%) afterhours as of this comment timestamp. Is this purely due to the dividend announcement?

<comment><USER18> Dividend announcement doesn't make stocks go up. They actually go down by the amount of dividend.

<comment><USER19> After the dividend record date, before it they do go up by a similar amount to the dividend of it wasn't already priced in at all.

</comment></comment></comment><comment><USER20> Based on the after hours results, it looks like this might push them just over a market cap of 1 trillion again, which if I'm not mistaken would make them the only company currently over $1T.

Edit: Apparently MSFT closed at exactly $1T today, so tomorrow shall be interesting.

<comment><USER21> MSFT closed at exactly 1T to two decimal places today, and is up slightly in after-hours trading, but this would be the first time we've had two 1T companies at the same time.

<comment><USER22> After all these years, it's still Apple and Microsoft at the top. Crazy.

</comment></comment></comment><comment><USER23> "Apple no longer reports iPhone, iPad, and Mac unit sales numbers..."

Probably because they only care about revenue and profits these days, not innovation and products. Apple didn't get to where they are by optimizing the supply chain but by coming up with incredible products that everyone HAD to have. I bought an iPhone last spring because it was the least-bad option in my opinion; if the Librem 5 is a flop I don't know what I'll get when my current phone dies because I will __NOT __buy a phone that unlocks by FaceID.

<comment><USER3> Because the number is the wrong metric for measuring the health of their products and customers. Unfortunately, the financial analysts have been so intensely focused on unit metrics to the point that they can't seem to grasp the true reality and condition of the company.

As a result, Apple had to go so far as to: 1) State that their goal is to make their devices last longer. 2) Stop giving unit numbers.

Still, I anticipate it will take years before financial analysts to internalize the true nature of this beast.

See: [http://www.asymco.com/2018/09/13/lasts- longer/](http://www.asymco.com/2018/09/13/lasts-longer/)

<comment><USER4> Any company that publicly claimed that their goal was to make devices that have a _shorter_ lifetime would be raked over the coals, FWIW.</comment></comment></comment>


Jsonpath – a query language for JSON in Postgres [pdf] - <AUTHOR> http://www.sai.msu.su/~megera/postgres/talks/jsonpath-pgday.it-2019.pdf <comment><USER3> Here's the real JSONPath:

[https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/)

This submission is for PostgreSQL's "JSON Path", which is very similar to the original JSONPath. I'm surprised, and disappointed, that there is no mention of the original JSONPath, which this is obviously inspired by.

<comment><USER4> So, what I'm seeing is that I currently have JQ, and if I get around to dealing with Postgre, I might also have SQL's JSONPath. And then if I get tired of juggling objects/dicts/arrays in my programs, I can also pick a not- quite-the-same JSONPath as a lib.

(Though the latter is unlikely, since Lisp and FP have taught me that a bunch of functions feeding into each other will do exactly the same thing quite fine.)

<comment><USER5> Don't forget JMESPath, as built into AWS CLI:

[http://jmespath.org/](http://jmespath.org/)

With language libraries or as jp CLI:

[http://jmespath.org/libraries.html](http://jmespath.org/libraries.html)

Example AWS CLI tricks:

[https://gist.github.com/magnetikonline/6a382a4c4412bbb68e33e...](https://gist.github.com/magnetikonline/6a382a4c4412bbb68e33e137b9a74168)

[https://opensourceconnections.com/blog/2015/07/27/advanced-a...](https://opensourceconnections.com/blog/2015/07/27/advanced- aws-cli-jmespath-query/)

<comment><USER6> Jmespath is also built in to the azure cli

</comment></comment></comment></comment><comment><USER7> json processing languages peaked with jq's language.

[https://stedolan.github.io/jq/manual/](https://stedolan.github.io/jq/manual/)

<comment><USER8> Is there a detailed comparison between JSONpath and jq? I'm esp interested in examples where jq is more powerful, e.g. jq one liner but JSONpath can't.

</comment></comment><comment><USER9> Does anybody else feel that the syntax is terrible and SQL is not a good fit for this? I, for one, would appreciate if the paths were accessible via a change to the SQL syntax as opposed to a magic operator or - even worse - <USER2> new function. Not to mention that the more complex the queries become, the more pain one can expect the query planner to be... personally, I'd prefer to make my own query plans instead, laying down the algorithms according to the best of my knowledge of the dataset.

It's not like optimizing in C, where the compiler looks at the AST and can actually discover something you wouldn't think of. My experience with PostgreSQL's query planner is that it requires so much fine-tuning it's near unusable and super quirky.

That isn't to say that I don't like PostgreSQL and its JSON capabilities - it's just that the more I use it, the more I wish there was something between it and current NoSQL databases...

</comment><comment><USER10> another alternative is jsonata, backed by IBM: [https://github.com/jsonata- js/jsonata](https://github.com/jsonata-js/jsonata)

</comment><comment><USER11> my 110 loc implementation [https://github.com/ldarren/pico- common/blob/master/src/plugi...](https://github.com/ldarren/pico- common/blob/master/src/plugins/json.js)

you can try it here [http://json.jasaws.com/](http://json.jasaws.com/)

</comment><comment><USER12> Looks like an inferior subset of XPath which is much cleaner and powerful

<comment><USER13> Isn't XPath for XML? How would you use it with JSON?

<comment><USER14> Xpath's relationship to XML is like CSS to HTML: its natural domain—and most common use—is XML. However, it is a general path selection/query mechanism with a UNIX-file-path-like syntax.

<comment><USER15> There are large parts of XPath which are XML specific, like attributes or namespaces or node names (JSON's arrays of arrays have neither). I am sure with enough effort one could use Xpath for generic JSON queries, but this will require non-obvious redesign of the language.

</comment></comment></comment></comment><comment><USER16> Interesting to see the old Soviet Union TLD is still in use.

There's a pretty nice jsonpath implementation that was recently produced at [https://github.com/pacifica/python- jsonpath2](https://github.com/pacifica/python-jsonpath2)

I haven't switched to it yet, but I'm keeping an eye on it, to see how long it's supported

<comment><USER4> > _Interesting to see the old Soviet Union TLD is still in use._

Weird to see a proper institution on that domain. The .su itself is quite alive and available for registration. It's mostly used as a "quirky knockoff tld," in the spirit of .io and such.</comment></comment>


Alibaba Cloud - <AUTHOR> https://intl.aliyun.com/ <comment><USER2> Last time I checked it had pretty much no documentation in english and even most of their website was in chinese.

Let's see if they did any better this time.</comment>


Ask HN: Thought my app a failure now I see Honeycode and Lists - <AUTHOR> I built last year an app (https://clusters.app) to allow excel modelers – I am one of them - to create web applications and monetize their skills (e.g. create easily a saas real estate mng app). I did some interviews, but people saw only custom made, freelance work as a potential revenue stream and I stopped working on it.
Now I see that Microsoft and Amazon are entering this space and I was thinking, what could I have done better or was it dead from the start. I understand marketing a new product is no easy task, but my initial results were disappointing. I couldn't even make advanced excel users see the potential benefits for them.
Anyway, the stack is python and vuejs. I am using pandas extensively (every table is a dataframe). My thesis was that python could replace VBA and I also added data manipulation at table level (similar to a notebook) and connections to public APIs (e.g. for stock prices) through a graphic interface.
tl;dr -I thought nobody wanted it -I see large companies are building similar stuff
-I know go to market is important, but still, I am puzzled <comment><USER2> FYI: your site can't be accessed on Chrome (not even forcibly) because it uses HSTS combined with an expired certificate.

<comment><AUTHOR> Thanks</comment></comment>


Global flight-path maps - <AUTHOR> http://www.bbc.co.uk/news/magazine-22690684

<comment><AUTHOR> The author used "a combination of python, arc and illustrator, with python doing the actual work for arcmap." - [https://twitter.com/MichaelMarkieta/status/33935004333520076...](https://twitter.com/MichaelMarkieta/status/339350043335200768)</comment>


The Cost of JavaScript - <AUTHOR> https://medium.com/dev-channel/the-cost-of-javascript-84009f51e99e <comment><USER2> Nice article, especially the data, but I'm disappointed they didn't cover more of the most effective approach: Design your site not to use javascript except where really needed!

I think most sites can be broadly classified as (1) "relatively static" such as hackernews itself, news/blogs, text-based sites in general, or (2) an entire program/application running in the browser, such as a game or collaborative text editor. Most sites fall into category 1 and therefore need very little JS to do their job effectively, but they come up with 50 different things for JS to do on their webpage, then spend time and effort optimizing and minifying instead of just not doing those things (or doing them in HTML).

<comment><USER3> You are thinking only on two extremes, between a news/blogs and game/collaborative text editor there a thousands of web apps that don't fit the two. What would you call webapp for generating and keeping track of invoices?

<comment><USER4> While it's possible I'm not understanding some important aspect of invoice generation, I don't believe JavaScript is necessary for this process... Plain HTML form inputs -> Server -> Generate PDF? What am I missing? Why's JavaScript required here?

I think we forget that the web was a pretty productive thing even before JavaScript was widely used. GMail existed (and still does) in a javascript- free form. You can even use Google Maps without JavaScript. Granted, JavaScript _enhances_ both experiences, but it's not strictly required.

<comment><USER5> There was never a time in the modern web era when JavaScript wasn't widely used. You'd have to go way back pre-2000 to find a time when popular websites didn't use JS at all. The Cambrian explosion of 'Web 2.0' wouldn't have happened without JavaScript and we wouldn't be where we are - doing everything on the server sucked big time, I do not want to go back to party like it's 1996.

To use Gmail, the poster boy of Web 2.0, as an example of why sites don't need to use JavaScript is bizarre. It destroyed other webmail sites because it used JS to give users a real GUI mail client on the web - the HTML backup works, but if that was all they'd given us we'd still be on Hotmail.

<comment><USER6> I thought gmail's big competitive advantage was giving users 1GB of space instead of 10MB or whatever that other free webmail providers gave us. I don't recall gmail's UI being remarkably better.

<comment><USER7> Also, good spam filtering and alternative access through protocols like imap.

</comment></comment></comment></comment></comment></comment><comment><USER8> Every time one of these JS-related posts come up (especially performance- related ones), I find interesting the seemingly huge disconnect between the JS-hating audience of HN and the actual silicon valley corporate/startup world where heavy-JS/React/SPA is everything.

Let me begin by stating that I'm not hating on either side of the fence -- I've been on both sides (and arguably, I still _am_ on both sides, if that were possible).

As someone who works on a lot of side projects, I can very easily see the argument of keeping web sites JS-light, and not even dive into all the React stuff. Most projects don't necessarily call for it except for certain very specific things. (I actually do not use React on _any_ side projects of mine, and still stick with jQuery.) On the other hand, after having joined a JS- fullstack startup this year, I can see that an article like this one is completely speaking to me/us. All I can say is, without the giant background context of working on a monolithic fullstack JS codebase, none of it makes sense; but when you're in such a job, everything of it makes sense.

<comment><USER9> I think it's so weird that many people on HN can't fathom a website being more complex than Medium. I've spent the last 5+ years doing nothing but develop data-heavy visualization apps. The alternative is not building a website without JS, it's building a desktop application using Swing or QT.

<comment><USER10> > I've spent the last 5+ years doing nothing but develop data-heavy > visualization apps.

Those aren't what this article is talking about though, For a huge client facing desktop web app, you can load things up front, expect the user to wait a bit, and then off you go.

But imagine if every page on HN took ~15 seconds to load. Heck the reddit mobile experience right now is that the comments section takes 4-5 seconds to load, and sometimes it doesn't load at all. Of course it is instant in their mobile app, and also instantaneous in their legacy mobile view. (Which makes me seriously question what in the world the modern mobile site is doing.)

Most content is temporary and short lived. Caching a script does next to no good if I only ever visit a site once or twice a month, I'd prefer there not be a script at all!

In regards to content, HN is one of the most valuable sites I use. The JavaScript is so tiny as to be inconsequential.

Give me a CNN.com that is as responsive.

<comment><USER11> I know your request is tongue-in-cheek, but here you go:

[http://lite.cnn.io/en](http://lite.cnn.io/en)

<comment><USER10> an old fashion img tag at top and I'd be delighted.

Need to resize the browser window to get a good column width, but that site is fast.

(pure black on pure white also isn't easy on the eyes, but plain ol HTML can change that as well! :) )

</comment></comment></comment></comment></comment><comment><USER12> We live in a world where everyone wants to make Electron apps instead of doing anything in a compiled language or anything other than JavaScript really.

Maybe it's because I've never been a webdev but I just don't understand the fascination with JavaScript. Personally I hate JavaScript any time I have to code in it. Give me literally any other language.

<comment><USER13> I programmed assembly then C then C++ through the the 80s, 90s and 2000s. I love JavsScript. It just so damn easy. No fighting with headers, include paths, linker options, make files , cmake files, scons files, etc. No cross platform bs. When I want to share I just send a link. Electron does have a few platform issues to build the app but they're most solved for me. I get formatting, styles, animation, for free. I get cross platform graphics, video, and audio for free, networking is trivial. I also get pretty amazing debugging tools.

iteration time is orders of magnitude faster than any C/C++ project I've ever worked on.

I hated JavaScript at first because I didn't understand it. It took about 2 year to stop trying to turn in back into C++. It didn't help that my first real intro was in an environment that used Google Closure and the closure compiler both of which were designed by Java programmers to try to treat JavaScript as Java and disallowed real JavaScript.

now I mostly loath going back to C++ and having to fight the dev tools on each platform which seem to change every 5 years such that all old samples fail.

is it JS perfect? no, i think I kind of miss static typing but not always. It's often a joy to just do it.

<comment><USER14> > No fighting with headers, include paths, linker options, make files , cmake > files, scons files, etc

Instead you get to fight with often poorly-versioned bower/npm dependency hell, and gulp/grunt/webpack config errors with inscrutable messages.

> having to fight the dev tools on each platform which seem to change every 5 > years such that all old samples fail.

Such stability! If anything in javascript still works five months later, I count my lucky stars.

<comment><USER15> I hear you but since I've been using yarn to lock all package versions I haven't had any issues.

[https://yarnpkg.com/lang/en/docs/yarn- lock/](https://yarnpkg.com/lang/en/docs/yarn-lock/)

JS development without yarn is complete madness.

<comment><USER16> which means that you do not use a npm proxy.

</comment></comment></comment></comment></comment><comment><USER17> It's not the cost of Javascript. It's the cost of shipping the latest trend as fast as possible by throwing in another lib that has all the options you will use 1% of.

This is happening everywhere.

And this is also why we are wasting so much time waiting for that page or program to load.

It's a nice article but isn't this something that should be so obvious for the avarge programmer?

<comment><USER18> This is covered in the article

>Removing unused code

<comment><USER19> Nope. it is about including stuff that you really need. I saw apps that where shipping angular + jquery just to provide a single interactive icon.

Article focus on very specific cases of the mobile web application. In most SPA it is not a big deal to ship a 1mb of JS.

<comment><USER18> They specifically mention tree-shaking and tools to strip unused code from libraries.

<comment><USER19> Read my answer more carefully. It is about using frameworks when you really need it. A lot of people include dependencies to their projects that can be avoided by better knowing JS and Web APIs.

</comment></comment></comment></comment></comment><comment><USER20> This is one of the biggest things I have found remarkable about the modern Web: how _slow_ everything feels.

Nothing just _loads_ anymore! Instead everything loads in dribs and drabs, as various bits of it stream down to the device, get parsed and get rendered. I waste so much time staring at placeholder graphics and missing clicks because the element I was aiming at skidded across the page after something else popped in. The more front-end technology we throw at the Web, the worse it seems to get.

It's hard to remember that once upon a time _Web pages were fast_ , even though we were viewing them on 1990s-era hardware that even today's budget mobile devices put to shame. We love the Web so much we are strangling it to death.

<comment><USER21> I've been paying attention to how slow the web is these days, and just as often as not I can finish a newspaper article (by far the worst offenders in 3rd Party API callouts) before the tab's page-loading indicator completes.

<comment><USER22> If it completes at all!

</comment></comment></comment><comment><USER23> I had a chance to hack through the new contributor interface for a leading stock photo seller after UX has become erroneous and extremely slow after an update last week. They switched from an under-invested front end interface to a React/Redux for submitting images. I was thinking that maybe the implementation was bad but I concluded that the React/Redux and the set of front end components were to blame. Go read react/redux websites with dozens of cool ideas leading to a user revolt.

Didn't we learn something from J2EE technologies that complexity is the source of all evil?

<comment><USER24> Hi, I'm a Redux maintainer. Can you give some more details on the issues you saw? What concerns do you have about using React and Redux?

<comment><USER23> Thx for the kind offer.

There's a list view where I select one or many video/image cards, and edit their titles, tags, descriptions in a single edit box singly or multiple. It's not about media editing, just their titles, tags and dozens of other data. Redux store contains all 200 image information as well as undo history.

Here's the issue - when I put there 200 things to edit, the screen becomes very slow to use. Like the mere act of selecting and having its title/description etc appear on an edit box is 2 seconds.

I have installed redux and react dev tools out of curiosity to understand what's happening. My conclusion, is that over 200 images to submit in batch combined with the undoable complex data store can't be handled. So I went to examine redux website and source code - which appears quite thin and performant. At the end I think react gets slow to update 200 cards from the complex store after redux store gets updated.

I currently don't have some things to submit otherwise I would post some animated screenshots. But next time I have I can post a github issue and pls let me know what kind of data I must include from to react dev tools for performance check.

<comment><USER24> Yeah, at first glance, I wouldn't _think_ that storing, displaying, and tracking selection for those items would be having performance issues, but obviously it depends on the actual code.

My React/Redux links list has a large section of articles on measure and improving perf in React and Redux apps [0]. You might want to look through some of those. Also, my "Practical Redux" tutorial series [1] has some posts that talk about perf behavior, including key Redux perf concerns, and ways to buffer form input change events

[0] [https://github.com/markerikson/react-redux- links/blob/master...](https://github.com/markerikson/react-redux- links/blob/master/react-performance.md)

[1] [http://blog.isquaredsoftware.com/series/practical- redux/](http://blog.isquaredsoftware.com/series/practical-redux/)

<comment><USER23> Wow that's awesome. Thank you for your kind interest..

</comment></comment></comment></comment></comment><comment><USER25> Not a hardcore JS-dev, but two things I noticed as someone who has optimized their JS output before:

\- I am surprised that this blog post advertises webpack tree-shaking, as it is completely broken right now, and has been for a year[0]

\- More and more people are switching to date-fns[1] from moment.js, since it is much smaller and composable by default, and works better with tree-shaking in rollup (or webpack once it's fixed). Yes, their recommendation of ContextReplacementPlugin is valid, but in the case of moment.js, its probably better to just use a replacement.

[0] [https://github.com/webpack/webpack/issues/2867](https://github.com/webpack/webpack/issues/2867)

[1] [https://github.com/date-fns/date-fns](https://github.com/date-fns/date- fns)

<comment><USER15> Angular 5 has been using the webpack ModuleConcatenationPlugin to reduce bundle sizes by half. It does Rollup-like scope hoisting. Google for "angular build optimizer".

</comment></comment><comment><USER26> I feel the web is so much faster on my phone since I started using brave and blocking all js by default. It's surprising how many pages load just fine with no javascript. Most HN articles do.

</comment><comment><USER27> This phenomenon seems like an almost inevitable symptom of another thing companies do, this one completely understandable: Making sure the dev team has nice equipment to work with. If we're always working with reasonably high-end kit, it impairs our ability to empathize with the experience of someone who's using a cheap Chromebook or the "free" phone.

Contrast with a previous place I worked, where the team that was building in- house tools worked on hand-me-down equipment from their end users. That's a shop where the users almost never had to complain about poor UI performance.

</comment><comment><USER28> This is why the webbrowser was not built for every little thing. We as programmers need to get back to writing applications and use the web more as a data stream. Thus letting the app do all the rendering ahead of time and we are just refreshing the data

<comment><USER29> Yes, the browser should be kept for HTML / CSS, and maybe some JavaScript for interactive documents.

</comment></comment><comment><USER30> I wrote this [1] guide on how to reduce the size of your JS bundles via transpiler optimizations. There's a lot you can do to write code which results in less boilerplate from your toolchain. It also covers code splitting via webpack and some other goodies (like evaulating the size of your polyfills). We've been using these techniques for a while in production (our library is very focused on size) with good success.

[1] [https://medium.com/@jbartos/to-ship-less-code-write- transpil...](https://medium.com/@jbartos/to-ship-less-code-write-transpiler- aware-javascript-a56250296760)

</comment><comment><USER31> Really neat article, might try to putz around with Brotli, hadn't even heard of it before.

Was anyone else totally fascinated at those iPhone 8 processing times? Holy shit, it's faster than a Macbook Pro 16!! That's absolutely insane.

</comment><comment><USER32> > adopt a Performance Budget for ensuring your team are able to keep an eye on > their JavaScript costs.

This is really good advice for product people.

</comment><comment><USER33> Oh the irony, having one of the prime facilitators of web bloat talk about "the cost of JS".

</comment><comment><USER34> How much might precompling to WebAssembly cut into that compile/parse time?

</comment><comment><USER15> Anyone here deploy ES2015+ or know of any large sites that do?

</comment><comment><USER35> I use AOT in dev mode.

</comment><comment><USER36> Pay attention to how much slower all the Android devices are here, whereas iPhone has long since reached laptop parity. So depressing how bad Qualcomm hardware is.</comment>


The latest Firefox privacy campaign video - <AUTHOR> https://snippets.cdn.mozilla.net/media/files/578456a5-ebcc-4c44-87e3-447e59561ec5.webm

<comment><AUTHOR> I am not much of a privacy freak. But this video did touch a nerve...</comment>