Unspeakable Ethics, Unnatural Law (1979) [pdf] - <AUTHOR> http://digitalcommons.law.yale.edu/cgi/viewcontent.cgi?article=3810&context=fss_papers

<comment><USER2> Lacan's foremost expositor, Slavoj Zizek, argues that humans have an inherent need to displace responsibility for their actions on some manifestation of the 'real' so ;find themselves' in a particular situation rather than regard themselves as authors of it, perhaps so as to preserve the (imagined) field of intersubjective social relations. I came across this argument in _Looking Awry_ though I'm sure he's developed it elsewhere as well.</comment>


Ask HN: What's the biggest time waste on your workday? - <AUTHOR> I've been thinking about things I have to do regularly, but are not worth the time.
Examples for me:
- manual tasks I didn't have time do automate yet (technical debt) - writing boilerplate code - unproductive meetings to discuss things that would be 1000x more efficient over text/a document
These are things I do regularly and they don't make me learn or improve at the rate of more interesting stuff.
Are these the same for you?
What are you doing that you wish you weren't? <comment><USER3> Useless meetings.

The worst is where some middle manager or project manager or business analyst calls in 20 different people into an hour long meeting. 5 people might actually get some meaningful benefit from the meeting, let alone actually utter a single word.

You try to skip it, but then said organizer pings you asking why you aren't present.

The same meeting is scheduled daily, because reasons. Never mind that there has been no meaningful progress or update to the project during the last 24 hours.

<comment><USER4> Yep, and it's worse when someone I don't even report to demands regular status updates. Rising-up in that firm meant demonstrating leadership by getting people to report to you, even if in an unofficial capacity.

Or there was the company where we had four (!) hours of meetings per day: two in the morning and two in the afternoon. All we ever discussed is what we didn't get done during lunch time.

After I left all that, my one question when interviewing with a hiring manager became: "How often do you have meetings?" A lot of people got very flustered with that one.

<comment><USER5> This happens a lot in my company. When things fall behind, first you tell your direct manager what's going on. Then you tell the same thing in a meeting two levels up. Then somebody really high comes and wants a meeting too. But he doesn't really understand the project so you have to spend a ton of time explaining what this is really about. And this goes on and on. Everybody wants to have their own meeting.

It always amazes me that we have this whole reporting structure and tracking tools like Jira but somehow the critical information doesn't really flow up. In theory they all would look at Jira and some status reports and then be up to date without wasting the time of the people who are doing the work.

<comment><USER6> The straight jacket of a project management software is not always helpful, but your manager must be able to effectively collect, analyze, and communicate status in both directions. In fact that's the only mandatory part of the job.

Your situation is highly dysfunctional. If you are not quitting just yet consider taking charge - collate the status of your project (you and people you coordinate with) into a tidy status update that your manager can take to their manager. It's a difficult skill, but you will earn undying gratitude. And god help you if you can add a meaningful chart (as opposed to a bullshit chart) to your stays update - you will instantly become the savior of the team.

Fun story. I have once received a promotion based on a single ducking spreadsheet of this sort. I was so mad about all my other "hardcore" engineering work not meaning diddly squat by comparison, I asked if they can take the promotion back (they refused). I came to terms with it eventually - <USER2> started walking up the management chain asking what happened and eventually I was told that hiring someone to write solid code is a question of throwing money into the hiring pipeline, but hiring someone to provide meaningful insight or direction is mostly a matter of luck.

</comment></comment></comment></comment><comment><USER7> The general distractions of the web/news/life.

One thing I recently realized is the secondary effect of gmail being open in a browser tab.

I like to be aware of my email in real-time so I can respond to pressing situations, therefore I keep gmail open in my browser's first tab. However, the secondary effect is that my _browser_ is always open, and the distractions of the internet are just one new tab away.

I recently started using TwoBird as my gmail client, which now keeps my email and my web browser separated. Yes, everyone who's been using a stand-alone email application has known this for years, but it's new to me.

I'm happy that I can now live/work/breathe without having a web browser open at all times.

<comment><USER8> Try checking email 2 times a day, when you begin work and when you end work. If the message requires an urgent response, the sender won't wait on an email anyway.

<comment><USER9> +1.

At my job, any high priority alerts are communicated via phone calls or Slack messages. Emails secondary, but it is annoying if someone sends you a last min event invite that you miss :-/

<comment><AUTHOR> I also check e-mail once a day.

I keep Apple Calendar open and hope any invites appear on it.

It happened once or twice not to, as it has a couple minutes delay from receiving the invite in the e-mail.

</comment></comment></comment></comment><comment><USER10> All project management tools introduce enormous overhead for me. All of them, they're clunky to use, either too general purpose or too specific, and when you need that bit of info you never know where exactly your colleague put it. Trello, Jira, Notion, even searching for something in Google Docs is a massive context switch and just feels dreadful with those sluggish single page applications that make laptop fans spin in five second bursts while they load.

So I have my own todo.txt with a plain old bullet list that I keep open in tmux+vim, and at the end of the day if there's some time left I update all the other tools.

<comment><USER11> > when you need that bit of info you never know where exactly your colleague > put it

> So I have my own todo.txt ... if there's some time left I update all the > other tools.

Do you see the irony?

Not saying this is wrong, just that you are a perfect example of how incentives perpetuate this problem.

<comment><USER12> I think its more a sign that these tools are eventually consistent despite their marketing copy claiming a total real-time awareness of your team's activities.

</comment></comment></comment><comment><USER13> I would have a lot fewer distractions and get much more done if we could just drop the pretext of "working" full time.

The "wasted" part of my day is simply being extremely inefficient and dicking around simply because it's expected to be in the office or available online. I would get _much_ more done if my job was to hit milestones and goals (perhaps with some designated "office hours"). And then I have the rest of my time to do what I need to. Fortunately the "dicking around" involves taking online courses, personal "stretch" projects, etc.. but still.

I don't want to sound bitter. I have flexibility when I start/end my work day. On any given day I can peace out at 1pm or show up at noon (so long as I'm not blowing anyone off). But that's on _any given day_, not _every day_. And so the repeated, iterated game that's going on between me and employer reaches a nash equilibrium where I do just "enough" that I'm advancing my career in the organization and little enough that I have enough lax time in the day to do whatever I can online for my personal life (coursework, shopping, personal tech projects/experiments, enrichment reading, etc).

<comment><USER14> I used to be a security analyst which meant I spent a lot of my day waiting for a security incident to either happen or be escalated to me. Now I'm a consultant which means I spent a lot of time waiting on clients. I've come to appreciate semi-mindless games like Rimworld, Cities: Skylines, Factorio, The Sims, or clicker games on my phone. I can fill my waiting time with those which I find fun, but they don't require so much of my attention that I miss a client email or Slack message come in and I can quickly switch back.

It's still wasting time, but it's less mentally exhausting than trying to switch to something more "productive" for a few minutes.

<comment><USER15> Project Highrise is a great one. Or so I've been told...

</comment></comment></comment><comment><USER16> Contextual switches.

I work on a variety of development projects with sometimes entirely different technology stacks, goals, people, etc. Sometimes there's overlap, often there's not. It can be daunting jumping between entirely different sets of technical challenges, goals, and conceptual framing of problems.

</comment><comment><USER17> I'm working for a big aerospace company and a lot of it (tech-wise) feels like/is a huge time waste, even more so the last four months where I've been working remotely.

1) Turn-on the computer, log in Windows, enter the overcomplicated encryption software password, launch IE6 to go to a webpage which will launch the VPN native app. (at least 5 minutes)

2) Opening Microsoft Project takes ages since the Project Server is in Europe. Then there's some kind of macro that has to run which in the end fails because I'm not on-site. You pick a plan to open it, it takes another 30 seconds, another macro/prompt/check fails. The whole process takes a good 3-5 minutes until you can actually work on it and I have 18+ plans to manage.

3) You can run reports of said Project plans and export them in Excel format but the formatting is all junky. You have unused columns, titles, hidden columns. I had to create a macro to import the exported file, import all the data, and creating a pivot table automatically instead of doing it manually X times a day.

4) We're still using Office 2010 while working a lot with Excel. The limitations of the 10 years old software is a real pain. Do you want to manage two Excel files in two separate instances of Excel? You'll have to open a separate instance first then open a file. You also can't use all the new formulas or enjoy the improvement made on the ones that already exist. I get that Office licences are not cheap and the "Fix What's Broken, Don't Break What's Working " motto but the time wasted on all this by everyone working for the group worldwide must be way higher.

5) Enterprise network is slow on-site, it's even worse on a VPN. Opening up a simple Excel/PPT file takes a good five minutes.

6) We're still using Lync, it's easier to send a screenshot/file via email than using this nightmare of a software.

7) IE6 is the "default" browser for everything

8) With the COVID-19 situation, we're not allowed anymore to use conference tools while being connected on the VPN. You have to save all the files you need for the call locally, log off the VPN, join the call, and then re-upload everything on the network.

<comment><USER18> IE6 as a _default browser_ in _2020_? How does that even work, considering I don't expect it to even be able to connect to any modern website?

<comment><USER17> We also have Chrome (with add-on blocked) if you need to browse any modern website on the internet but don't expect any entreprise tools/intranet website to properly work.

</comment></comment></comment><comment><USER19> Constant/Regardless Of Lockdown:

\- Filling out timesheets and the stress behind the feeling of having to meet a minimum number of hours each month.

Before the lockdown:

\- ~2-2.5hr daily total for commute. Includes 20min walk to and from subway, and 40-60min to and from subway ride. Add on the stress of dealing with noise, obnoxious people, putrid smells on the subway, etc and it's especially mentally/emotionally draining.

\- Useless meetings that only add to the charade of an organizer trying prove their value/that they are "working". 90% of the time it's a waste of everyone's time.

\- Small talk disruptions. Tend to last at a minimum 20min and throw off flow. Not always a negative, as sometimes the conversations can be fun.

\- Being targeted by petty politics. FYI, I keep to myself and get my shit done. I don't like getting wrapped up in unnecessary things of the sort. Hard to quantify in terms of time waste, nonetheless it's soul sucking and results in lowering my productivity and me ruminating on ways to leave the company/become self sufficient.

\- Office noise. Lowers productivity.

\- Indoor air quality/"sick building". Lowers productivity/cognition/health.

\- Using personal device for tethered internet access for personal laptop. Slower connection, but is clear of employer's snooping on traffic and communications. And with using my own laptop there's no dealing with sudo/admin restrictions and having to place tickets to packages everytime a package requires permissions.

\- Job hunting.

Post Lockdown (much more productive, at ease, and content with work life):

\- Giving attention to my overly social, going blind, much loving (though it gets overwhelming lol) street cat.

\- Cooking home meals/meal prep

\- Checking in on family and loved ones.

\- Working on assignments/projects/research/building tools. Not a problem/time waste though. I actually enjoy the work I do and the client projects. The projects are 90% of the the time for the benefit of society. So imo, the work has meaning and it doesn't weigh in my conscience.

</comment><comment><USER20> Poorly defined and incomplete functional requirements with mare hints of the expected non functional requirement

Leads to: \- Frustrated developers who thought they were done and were doing good \- Frustrated QA engineers who can't certify the feature as written \- Frustrated product owners who were assured the feature was "done" \- Frustrated management who is told it will take longer than promised

<comment><USER21> Do you have a project manager / product owner on your team?

<comment><USER20> We do, they are the ones writing the poor requirements.

<comment><USER21> Do your PMs have a background in the type of engineering that you do?

It may be helpful to point out bad requirements whenever they're provided. Keep a copy of the bad requirements and why they're bad, so when they repeat their mistakes, you don't have to repeat yourself explaining why the requirement is bad.

<comment><USER20> I think driving towards the point of this thread, I could envision a JIRA plugin which helps writing complete and well defined stories of manageable size. It could simply be a template with appropriate sections, or a Q&A bot which drills down to the requirements.

</comment></comment></comment></comment></comment><comment><USER22> The biggest time waste for me is the distraction caused by working in a cubicle without a door.

<comment><USER23> Reminds me of: [https://heeris.id.au/2013/this-is-why-you-shouldnt- interrupt...](https://heeris.id.au/2013/this-is-why-you-shouldnt-interrupt-a- programmer/) I think 'do not disturb' mechanisms are vital for serious programming work. There's a huge chasm between work that you've essentially done all the parts of before, and are just combining, and brand new ground (which can be a tricky bug). We might condition people around us to believe that the stakes aren't high, which unfortunately when problems require us to load them entirely in brain cache to efficiently manipulate them, our frustration is hard to communicate

</comment></comment><comment><USER24> Slack semi-async back-and-forth exchanges for hours about things that could be solved in 5 mins with a sync voice call.

</comment><comment><USER25> The build time for my app, if I run all the unit tests and checks is really long. In the order of 5 minutes I think. This is a real pain, so usually I try to tackle a quick TODO (like an easy code review) while the build is running, but...

... context switching is also a real pain. Slack is a killer for that because I obsessed over seeing the little dot on the icon. "What if it's really important? What if someone needs support to get unblocked now?", so I always check incoming messages. This one is probably mostly on me having some mild OCD or something.

<comment><AUTHOR> I disabled everything possible in Slack, but still feel the same. Can't go for more than 1 hour without checking it, pretty unproductive, but needed in order to help friends get things done.

</comment></comment><comment><USER6> I follow the "ski-rental problem" rule on automation - if it takes 12 hours to automate something I will wait till I have wasted 12 hours of manual labor doing it, and the automate the beejezus out of it.

It's not an exact rule but it removes anxiety and doubt which are a lot more damaging than the manual labor itself, freeing up the mental cycles for what really matters.

[https://en.m.wikipedia.org/wiki/Ski_rental_problem](https://en.m.wikipedia.org/wiki/Ski_rental_problem)

</comment><comment><USER15> The biggest one is repeated meetings to go over things with people who are not capable of written communication. It's particularly egregious now, when everyone is 100% remote.

It's not that much extra work to grab a few screenshots and write a paragraph or two. Then it also becomes permanent, and not ephemeral. Bonus points if you can take the extra minute to mark up a screenshot or draw a sketch.

<comment><AUTHOR> Feel the same, it looks like people used to stop by your desk at the office can't move to async/written communication, despite it being much more helpful for the company.

I'm trying to evangelize coworkers as much as I can, sharing content on the topic, asking for things to be written, but it's something slow to change.

<comment><USER6> Some people who are not good at writing are good at producing short 3-minute videos. Might be worth a try?

Writing well is a very difficult skill to acquire.

</comment></comment></comment><comment><USER26> Next to no unit or local testing.

It's a Java monolith multiple teams work on at once and someone several steps removed from our team decided to set maven-surefire-plugin to fork for every test and not reuse forks in the POM all our projects inherit from in 2014. That causes a ~1s delay per test (even @Ignore'd ones) where they used to take less close to a millisecond, and I've tracked down the "business exception" commits in our projects that came in the months after that disabled the test phase entirely, in order to overcome the build time delay. The rest is history. Now we've got projects where 98% of the tests laying about in the repo are dysfunctional lies.

Couple that with using Spring across multiple independently built modules multiple teams commit to and you're looking at one or more hours between committing a change and finding out whether or not the latest build deployed to an environment successfully starts so you can test your change.

<comment><USER27> I've worked on a project that forked for each test. We were working around the abuse of static singletons. I had a very small look at a tool that could start JVMs in a pool that you use later on.

We ended up splitting our tests using annotations to only create separate JVMs for tests that needed it. You could also look at class data sharing.

Not a fun state of affairs, good luck!

</comment></comment><comment><USER21> To limit meetings, and unnecessary, distracting conversations, one way that I've found that individual contributors (engineers, artists, writers etc.) can segment their day is by splitting it between hours where they'll work on their individual tasks, and hours where they'll assist others.

For example, in practice this would look like: If your team has a project manager, then explain the situation to them... tell them that you won't take meetings after 12pm unless it is for some kind of an major emergency. Similarly, tell your teammates that you won't go to meetings after 12pm unless they are stuck on a problem. Ask everyone to schedule time on your calendar if they want to talk to you - and it'll have to be before 12pm.

If you don't control your own time, then other people will.

</comment><comment><USER8> Fuzzy interfaces with my product team

No one can agree on the definitions for the following regarding features and bugs: in production, ready for development, ready for QA, blocked, cannot reproduce. Jira simply exacerbates this problem by giving the appearance of the opposite.

At the end of the day, progress is only made when engineers turn ideas into applications, so the buck ultimately lands with us each and every time. However, we are not experts on product development so any criticism we may have regarding the process is not only misinformed but detrimental to our team spirit ...

"It is difficult to get a man to understand something, when his salary depends on his not understanding it."

</comment><comment><USER5> In work in medical devices so we have to do a lot of documentation. In order to stay "lean" we have only a few tech writers so at every project the engineers have to figure what docs to produce and then push them through various review processes. This takes a lot of time so the most senior engineers are spending way more time on the documentation process than they do thinking about technology. The tech almost feels like a side effect.

And in every project there is a ton of discussion about what regulatory process to use. Instead of figuring this out beforehand usually it holds up the whole development process for a long time. It can be really frustrating.

<comment><USER6> Do you think this is wrong? I'm not jesting, I want to discuss this.

I often times find that making functionality takes me barely 30% there. Making even a short stand up status update that drives the point to the whole team is very valuable - it energizes everyone seeing that good progress is being made, it makes sales (they also do customer development) know to push new things or inquire about adjacent needs, informs support of what's possible and worth asking about.

Then there are more detailed feature lay downs, for the same reason. Then there is the interface itself. And fumbling through often imprecise and sometimes angry customer requests. It's all non-feature work, and it takes huge amount of time, but it seems very valuable in the end, however non-fun it seems.

So I'm wondering if I'm a regulated work like yours there is similar benefit to non-feature work?

<comment><USER5> Writing docs and stuff is fine but the whole submission and review process is very convoluted and arcane. If we had some people who do this all the time they would get proficient at this. Right now a lot of the docs have a ton of errors that easily could be avoid that way. So it eats up a lot of engineering time plus the output is low quality.

</comment></comment></comment><comment><USER28> Our checkin process is abysmal. 2 hour regression that you can't avoid. Several additional test suites that you have to run manually which, if you break them, you will hear about. Perforce version control is terrible compared to Git and makes branches difficult.

Tons of time wasted reverse engineering what the developers did, because they don't document decisions and protocols between modules in any precise way.

Project planning is big show for management and ends up very disconnected from reality. So many status updates. Sigh.

</comment><comment><USER29> Creating a complex, but exciting solution for a problem that doesn't exist. Sometimes I waste half year or more in a bad research direction that I shouldn't have taken.

</comment><comment><USER6> If you are struggling with distractions consider this advice from Paul Graham:

I now leave wifi turned off on my main computer except when I need to transfer a file or edit a web page, and I have a separate laptop on the other side of the room that I use to check mail or browse the web.

[http://www.paulgraham.com/distraction.html](http://www.paulgraham.com/distraction.html)

</comment><comment><USER30> Responding to customer sales inquiries. I'm a hacker, not a salesperson, but working for startup means I have to switch hats and give a pitch 30% of my week. Why is it a waste? Because I suck at it. My company doesn't have real salespeople so we all pick up the slack. I realize it translates into putting food on my table, but I'm so bad at it that I consider it a waste.

</comment><comment><USER31> First, I must admit, I'm reading some RSS feeds. At least the headlines. Sometimes it's unrelated to work, but mostly it's about tech somehow educating and inspiring. Personally I would say, it helped me to keep track of what is going on, what is trending and the best thing: Sometimes I find a nice piece of software that I haven't known about.

Back to things that I consider waste of time:

1\. Bikeshedding Have you ever had a discussion about timezones with a solution designer? It's everytime the same: "We need localtime because system x is doing it and it's confusing to compare it" (no, you don't! You need to store them with timezone information and solve the human problem in presentation)

2\. Discussing the need for bigger changes Yep. Your agile-developed system is running for some time and you see how it's being used and notice: It works, but it could be much better.

So you start a meeting others here describe as waste of time, because the result is "no" and the lasting result is, that somebody might keep the idea for later because there is potential (so not completely wasted).

But anyway, the time to prepare what you want to express in a way even managers can understand is annoying.

Coworkers often tell me, my ideas are inspiring and they would want to see them implemented. I feel it shatters because they are too big and sometimes cause efforts for other times because they have to change something so coordination is needed etc.

3\. Finding workarounds for technical restrictions given by the company or project Development workspace is virtual and has a proxy with whitelisting for internet access. Things like Python's pip are useless. So you setup a proxy on your local machine and build up a reverse tunnel.

More common: Doing things on machines without root access. You have to figure out how you get information why something is not working but logs are not accessible. Nope. You have to ask someone with at maximum your understanding of the problem to assist you.

Closing: I consider myself as maybe 50% productive, but compared to results of others, I'm feeling much more effective, when I'm doing something. Not mentioning when I'm motivated and very concentrated. These are the moments where it feels like I'm getting the work for a whole week done in one day.

Thanks for reading

</comment><comment><USER32> Slack is the most counterproductive tool ever for me. I cant turn it off or ignore it because my manager will be upset. Im spammed constantly with notifications from all the channels Im supposed to monitor and most the traffic isnpointless chatter. I really wonder if anyone at my company is even getting any work done.

<comment><USER33> Turn off notifications for periods of 30/60 min? Still acceptable, and you could focus more.

</comment></comment><comment><USER34> Begging people to follow through on things they've committed to do.

I can't wait until I can afford better, reliable help.

</comment><comment><USER35> Taking a 10 minute break to make coffee or see what my daughter is doing which inadvertently turns to 30 mins to 1 hour since she won't let me go back, and if I just happen to watch tv during that time I end up wasting nearly my whole day.

It's the reason why I work very late nights now.

<comment><USER36> Sounds exactly like me. I work very late at night as well to make up for the day where I have to check on the kids a lot as my wife works away from home.

</comment></comment><comment><USER37> Checking Hacker News>New multiple times a day and following all the interesting links.

<comment><USER17> You should use the RSS feed of HN, it'll be easier than just checking the site each X hours/minutes.

</comment></comment><comment><USER38> As a developer, it's waiting to receive customer specs from management. Sometimes I think we should just get the specs directly.

</comment><comment><USER39> Clicking "yes i accept the cookies" on average 150 times per day.

<comment><USER40> I use this Kill Element bookmarklet which mostly gets rid of such static unwanteds. Not quicker but is more satisfying.

        javascript:for(var i=0; i<(document.getElementsByTagName('a')).length; i++) {(document.getElementsByTagName('a')[i]).style.pointerEvents = 'none';}function handler(e) {e = e || window.event;var target = e.target || e.srcElement;target.style.display = 'none';document.removeEventListener('click', handler, false);cursor('default');for(var i=0; i<(document.getElementsByTagName('a')).length; i++) {(document.getElementsByTagName('a')[i]).style.pointerEvents = 'initial';}}document.addEventListener('click', handler, false);cursor('crosshair');function cursor(cur) { document.body.style.cursor = cur; }

</comment></comment><comment><USER41> I'll take dealing with toxic, aggressive blowhards for $300, Alex.

</comment><comment><USER42> Electronic medical record post-click data load time

</comment><comment><USER43> Stand ups. (We are an SRE department)

</comment><comment><USER44> Deploying my tests apps to heroku

</comment><comment><USER45> Actually filling up workday.

</comment><comment> peter-m80 Jira tickets beureucracy

</comment><comment><USER46> Meetings, duh.

</comment><comment><USER47> Underspecified tasks. Companies like to pretend that devs should "own the solution" but in reality there's a lot of coordination involved and you can't just make things up. Trying to find a way to get feedback from everyone just to get started is a huge waste that someone like a product owner should handle</comment>


IBM's Noise Free Nano Lab - <AUTHOR> http://www.technologyreview.com/Biztech/21008/

<comment><USER2> Looks like the world's most expensive high-end phonograph listening room to me.</comment>


Why I hate iOS as a developer - <AUTHOR> https://medium.com/@Pier/why-i-hate-ios-as-a-developer-459c182e8a72 <comment><USER2> There was a thread recently regarding "knowledge rot", which is what you are experiencing. Being as it is a closed platform, all of your hard-won knowledge is at the mercy of a board of suits answering to shareholders.

Microsoft finally capitualated, and Apple will too. But the force that causes it is developers refusing to work their plantation.

<comment><USER3> I think that the force that caused it was not being #1 anymore. When Microsoft had the leading platform, it could have contempt for developers, we had to cater to their whims if we wanted wide distribution. Microsoft only opened after they missed the smartphone bandwagon and needed back programmers sympathy.

It was the same story for IBM, it will be the same for Apple: companies are friendly when they try to reach the first place. Then they close up.

<comment><USER2> You just said the same thing in a less-direct way. Developers stopped working with MS. So they opened up as a survival strategy.</comment></comment></comment>


1 In 4 Food Delivery Drivers Admit to Eating Your Food - <AUTHOR> https://www.npr.org/2019/07/30/746600105/1-in-4-food-delivery-drivers-admit-to-eating-your-food <comment><AUTHOR> The tamper-proof packaging idea is intriguing, but it would not be good for some foods (including tempting ones like french fries) to have them kept in an enclosed package.

At In N Out, a server recommended keeping the paper bag open so the fries and burger wouldn't get soggy on the way home.</comment>


SpaceX Launch livestream (starts at 12:50PDT) - <AUTHOR> http://livestream.com/spacex/events/3959775#taketwo

<comment><USER2> Weather is 60% "go" ... Lightning and clouds are still a concern

Schedule:

                    PDT      ET     GMT     BST
        * Webcast: 12:50   15:55   19:50   10:50
        * Liftoff: 13:10   16:10   20:10   21:10

Please correct me if I'm wrong - it's the best I can do!

NASA webcast: [http://www.nasa.gov/multimedia/nasatv/#](http://www.nasa.gov/multimedia/nasatv/#)

Currently live.</comment>


An IoT dashboard - <AUTHOR> http://dashboard.sidlee.com/

<comment><USER2> OK, this is epic. Well done guys! I especially like this: [https://undo.meteor.com/](https://undo.meteor.com/)

I sometimes worry about the privacy implications of making this data public but aggregating by hour seems to alleviate some of this. How do you get staff buy-in? e.g. the undo is effectively a key logger.

I thought monitoring door locks [0], power usage [1] and temperature [2] was fairly advanced. What are you using for the power monitoring?

\--

[0] [https://unop.uk/dev/spark-core-shower-room-door- sensor/](https://unop.uk/dev/spark-core-shower-room-door-sensor/) (v2 write-up with Blinkytape coming soon) [1] [https://unop.uk/dev/raspberry-pi- electricity-monitor/](https://unop.uk/dev/raspberry-pi-electricity-monitor/) [2] I use a [https://twitter.com/myjoulo](https://twitter.com/myjoulo) (their main site is down)

<comment><USER3> Thanks! [https://undo.meteor.com](https://undo.meteor.com) was a side project last year that we aggregated into the dashboard. The undo is indeed a key logger on all Macs at the office. The server only registers the events when the IP address from the sender matches the office's (so we don't log events outside of the agency). We're about 30 people at the office, they all know and trust me. They're all aware of the logger, and it does show in the menubar. And it really, really, really only logs LeftCommand-Z and sends the first name from the logged in user + the active app. Looking forward to your sensors btw!

<comment><USER4> Is the source code for this key logger available somewhere? I'd be interested in extending it to track Ctrl+C and Esc (heavy Vim user here)!

<comment><USER3> Here! My first OS X app, and I'm no developer, so probably poorly written. [https://github.com/SidLeeParis/UndoLogger](https://github.com/SidLeeParis/UndoLogger)

</comment></comment></comment></comment><comment><USER5> Their YouTube video [0] and GitHub repo [1] are providing some background details (it's all made with Arduino sensors).

[0] [https://www.youtube.com/watch?v=TioYIJhdaKo](https://www.youtube.com/watch?v=TioYIJhdaKo)

[1] [https://github.com/SidLeeParis/sidLeeAgenceConnectee](https://github.com/SidLeeParis/sidLeeAgenceConnectee)

<comment><USER6> You are the real MVP!

</comment></comment><comment><USER7> I'm sure you worked very hard on this. It looks attractive.

Why would anyone want to know the number of times someone used the stairs at your office?

<comment><USER3> Just to clarify: this dashboard was made as a sort of a joke :) The data is real but our idea was to make something completely uninteresting fun to watch. We don't use any of the data in a business or cost reduction perspective (although I have to say that the number of printouts makes me realize we could be more eco-friendly). Nothing here is a technological achievement per se, the fact that we brought all this together is what makes it fun.

<comment><USER8> While well done, this illustrates the pointlessness of the current focus of IoT applications. Getting a metric on how many times a door is opened, or how many times the toilet has been flushed has extremely limited usefulness for most people.

I know you guys are simply using this for illustrative purposes, but I believe there is an army of developers out there looking to make all this happen...for what purpose, I do not know!

This design is excellent though, good job.

<comment><USER7> There IS an army of developers waiting to make this happen.

[https://www.myvessyl.com/](https://www.myvessyl.com/)

Look. It's a cup that tells you what you're drinking and records it. Why? I don't know. To lose weight? Why not just drink water? I don't know!

And it gets stupider from there. We have an obsession here with recording every little thing. That's great, if that data changes behavior. But some data just tells you what you already know, and stresses you out.

People in the 1st world have enough data. What we need is clarity! I want to retreat to a monastery sometimes.

<comment><USER9> Don't forget paper [1] and pencil [2] to go with your cup!

[1] [http://www.fiftythree.com/paper](http://www.fiftythree.com/paper)

[2] [http://www.fiftythree.com/pencil](http://www.fiftythree.com/pencil)

Maybe this tech could be extended to create anti-drug cups en-masse for bars, or maybe use it for simple safe-water testing? Or what if diabetics could use it to test for sugar levels? Just speculating, I have no idea how it works though.

<comment><USER7> These questions were asked when Vessyl made the front page months ago.

1\. It can't detect date rape drugs. 2\. It can't tell if your water is clean. 3\. After detecting what you're drinking, it will tell you on average, how much sugar that drink has. Maybe that's useful for diabetics. Not sure. But it's not being marketed to diabetics. It's being marketed to tech people who like tracking things.

BTW, Love "Pencil". Especially this quote: "An artisanally crafted tool. The body is milled from a solid piece of premium-grade walnut that has met rigorous standards for sustainability. Each Pencil has a unique character that will subtly change with years of use."

Ha. Artisinally crafted. Walnut. Stylus.

</comment></comment></comment></comment></comment></comment><comment><USER10> You've made Ed Tufte cry... The concept is cool, but the display is terrible. Black and white, seriously? There is no organization, no drawing attention to the relevant data (is anything recently changed? Out of the usual range?). Just a bunch of data thrown at the screen.

Don't give up, but you got some ways to go.

</comment><comment><USER11> I love things like these, but I'm worried about the security implications (even though they're hosted on my own server). I've been thinking about encrypting the values (I only do TLS now), but you can probably get a lot of information from traffic analysis alone.

A bigger question is how to send the control signals (e.g. lights/AC on/off) in a secure manner, so I've devised a protocol that uses ECC keys to sign each request. The keys are exchanged during an initial pairing process, and then the client (the thing that controls the lights) knows to trust the controller (the mobile phone or PC). If you don't have the private key, which is only ever generated and stored on the device, you can't control anything, so it's even safe in the clear.

<comment><USER12> Killjoy :(. I thought the _whole point_ of IoT was to be able to flicker your neighbour's lights, turn on music on your crush's radio and flush random toilets remotely.

(I'm only partially joking. Security and fun seem to be mutually exclusive.)

<comment><USER11> Unfortunately, some people have a different concept of fun from ours :P

</comment></comment></comment><comment><USER13> This is a clean looking dashboard! Nicely done. Is it a live demonstration? If so, what hardware do you use or do you have any blogposts about it?

I'm curious about a lot of things, like how did you integrate this with common hardware? (eg. the widget with footballs used)

<comment><USER14> Seems like a lot of nifty Arduino implementations. At the bottom they give credit to the work of "Arduino and Server." Edit: ...and at the top it states "Real time data with Arduino."

<comment><USER15> Yep, 7 arduino ethernet (thanks to all the rj45+poe sockets on the walls in the agency), 2 spark cores (wifi), around 50 electronical parts (sensors and stuff), and some programs running on the internal network (cmd+z and printed sheets measures)

</comment></comment></comment><comment><USER16> Click many times on the switch button in the bottom left, you could get a reward.

</comment><comment><USER17> In the Arduino source, it seems that each sensor has a token that has been hardcoded into the query to send data to the API.

Wouldn't this make it way too easy for somebody to fudge your data by sending fake API requests?

<comment><USER15> yes, that was a stupid move, i just removed them

</comment></comment><comment><USER18> What a fantastic tinker tool! You're clearly using a lot of different sensors for a lot of goofy reasons, but that is the very basis for curiosity!

Well done and thanks for sharing your code!

</comment><comment><USER19> > Sorry, we were too lazy to optimize this site for your current browser. > Please download Chrome for the best viewing experience.

Sorry I am too lazy to care about browser specific web sites.

<comment><USER3> Fair enough :) Do you mind sharing what's your browser? Trust me, it's been hard enough to work on Firefox, Chrome, Safari, iOS and Android for a first try!

<comment><USER20> I had the same message on my Windows Phone 8.

It actually doesn't show too bad. So I would anyway rewrite this message.

\- First, why absolutely say Chrome ? Especially if it actually works in Firefox.

\- Second, well, even if I wanted, I can't download Chrome on Windows Phone, so I would say that you should detect when it's a smartphone and show a different message then.

\- Third, I can understand that it's a lot of work to support all of those platforms, so I don't necessarily expect that you fix the issues with Windows Phone, but that really irritates me when people always advise to download Chrome. This is not IE 6 times anymore, we should all learn from it :)

<comment><USER3> New message is up, linking to browsehappy.com :)

<comment><USER20> Yes, saw the commit on your project, thanks ! :)

</comment></comment></comment></comment></comment><comment><USER21> People are leaving at 2/3AM? Hope this was an office event!

</comment><comment><USER22> I find it crazy that people leave/come in to the office at 4AM/5AM in the mornings. Also note the peak in CMD-Z at 12am... :/

<comment><USER3> Yep. Unfortunately, it happens that we work late. We had a pitch presentation this morning, creative team working all night :S

</comment></comment><comment><USER23> All I see on this page in my browser is a pulsing white circle in the middle of the screen.

HN'ers do you see something else? Is it just me?

<comment><USER3> We experienced a server crash a few minutes ago, I think your problem is related. Can you please refresh the page?

</comment></comment><comment> tek-cyb-org This is totally what IOT NEEDED!~!!!!! Ive always though this. incredible work guys! how can I contribute?

</comment><comment><USER24> Impressive. What kind of sensor was used to determine the goals for table- football?

<comment><USER15> Arduino + IR beams [https://www.dropbox.com/s/yyof9imgl6ps1aq/2015-01-22%2022.32...](https://www.dropbox.com/s/yyof9imgl6ps1aq/2015-01-22%2022.32.37.jpg?dl=0)

</comment></comment><comment><USER25> 2-3 degrees lower would be great for savings and the environment (+ health) :D

<comment><USER3> And for people working there! To be honest, the sensor is near a radiator, ambient temperature is hot, but not that much ;)

</comment></comment><comment><USER26> This crashes chrome on iOS. Seems like a cool project though.

</comment><comment><USER27> A prime example of why dashboards are useless. Information that nobody needs (toilet flushes? ctrl, excuse me, apple-z's?) shown in a shiny way.

<comment><USER28> _Information that nobody needs_

Wow.

Toilet flushes: a significant change in the frequency of toilet flushes may indicate the spread of communicable diseases such as gastroenteritis, or community health problems like food poisoning.

Apple-z: Clearly someone is having a lot of problems with whatever software they are using. There is a UX optimisation opportunity there.

<comment><USER12> > _Toilet flushes: a significant change in the frequency of toilet flushes may > indicate the spread of communicable diseases such as gastroenteritis, or > community health problems like food poisoning._

Well, you can't learn anything from just a number of today's flushes. With a proper chart graphing frequency over time and emphasizing changes, sure. But that's not what you get on the dashboard, at least without clicking. The lone number is useless.

> _Apple-z: Clearly someone is having a lot of problems with whatever software > they are using. There is a UX optimisation opportunity there._

Well, maybe. You can't tell from a lone number. Again, the graphs you can find when you click around could be useful, but not what you get by default.

Information is useless if it doesn't help you make decisions.

<comment><USER29> Hover over that tile and you get a (+). Click on that, and you can graph by day/month/year.

<comment><USER12> I know. But some (most?) of this data should be shown by default if you want to be able to just glance at the dashboard and learn anything useful.

</comment></comment></comment></comment></comment><comment><USER30> Dynamic infographics.. Excellent.

</comment><comment><USER31> Nicely done. Excellent !

</comment><comment><USER32> Just amazing idea !</comment>


Ask HN: What is your process for executing ideas? - <AUTHOR>

Is there a single guide or resource for web entrepreneurs to use to bring their idea to fruition? Such that would cover idea vetting, getting the idea executed on < $1k (hosting, squeeze page, template, domain, etc.), and marketing?<p>I have a dozen excellent opportunities, but feel like I spin my wheels trying to get the basics executed. <comment><USER2> Depends on the idea and what it requires. If its easy enough to hack, then just build it and launch it with its core features. If you need more validation, then time to do some market research, build a landing page, drive some traffic to it, etc. to see if its a worthwhile pursuit.

<comment><AUTHOR> I should say, I am not a developer, so am wondering which are the go to resources for executing (i.e. templates, hosting, domain, logo, etc.)?

<comment><USER2> Well, its bit harder at these stages since you lack the basics. I would personally invest a bit of time into learning HTML/CSS, and playing around in Photoshop.

If you choose to buy a design, you have MonsterTemplates or ThemeForest, but you'll have no idea on how to customize them without some HTML/CSS knowledge.

For hosting, there tons of paid options, I would try using free hosting for now and learning a bit about using an FTP program to upload your data.

Really, unless you have huge skills or opportunity elsewhere, you're starting at the basics of web development which leaves you in no position to try and start a web-based business. After you learn a bit more, maybe then you can decide whether or not you want to keep learning development or if you'd rather hire / recruit a developer.

</comment></comment></comment><comment><USER3> I hack ideas myself and spend most of the money in marketing because unless people would about it, this is useless.

<comment><AUTHOR> What would you suggest as a primer on marketing a Saas or online marketing?

<comment><USER3> I am not sure if I got your question but the best source of available marketing I see is SEO. If you want any of your product quickly publicized you must spend some money on SEO marketing.</comment></comment></comment>


LinkedIn applications: Too little, too late - <AUTHOR> http://www.thestandard.com/news/2008/10/29/linkedin-announces-applications-why

<comment><USER2> This is really weak criticism here. He is bashing LinkedIn for not opening the flood gates right away, not being for largely frivolous communication like facebook and twitter, and accusing them of being too exclusive.

 _"If I have an application with a clearly compelling value I don't need the approval of LinkedIn; I can just build the application either by myself or for a different platform."_

He is looking at this completely negatively. The applications they are launching with were also developed externally. Nobody should have to wait for the go-ahead from LinkedIn to develop, they should develop a quality product that makes sense within the business network.</comment>


Why Rubyists ignore concurrency - <AUTHOR> http://marcosccm.com/posts/why-rubyists-ignore-concurrency

<comment><USER2> Concurrency and running 10 servers are equivalent. It may be very coarse grained but process level concurrency is where things are MUCH easier (though there are still pitfalls).</comment>


Leaving Python for JavaScript - <AUTHOR> http://hire.jonasgalvez.com.br/2017/Aug/25/Leaving-Python-for-JavaScript? <comment><USER3> So a person who writes web apps prefers JS over Python. Cool. Pick the right tool for the job. If your job is writing client-side-heavy web apps that share code between the client and server, then JS might be a better choice than Python.

Look, writing programs that respond to HTTP requests with HTML is not rocket science. You can do it in JS, Python or Ruby and be very productive. If you hate yourself, you can do it in Java, Go or whatever else and trade server performance for development speed. If you really hate yourself (or are Amazon circa 2004), you can write your whole website as a C++ static binary.

My theory is that the endless proliferation of JS libraries, frameworks and language revisions are because lots of smart and talented developers are employed to build websites - but building websites is just not that technically interesting, so they express their creativity by creating new tools, frameworks, package managers and ES revisions. It's a symptom of boredom.

But my one bit of career advice would be don't "Leave X for Y." Don't tie your livelihood and career to a single X or Y. Learn how to use a variety of tools and pick the best one for each job. Any big project will require using a few different tools and really valuable developers are the ones who can navigate that entire landscape intelligently.

<comment><USER4> Right? When I read these kind of posts I always imagine a carpenter saying the equivalent "After over 10 years using a hammer as my main tool, I have moved on to the screwdriver." Which is nonsense.

<comment><USER5> With programming languages you can both screw and hammer. I'ts not like you need to know C++ to do GUI's and D to make CLI's, or the other way around. What's the best tool for the job when all tools does basically the same thing ? I would say the tool you are best at.

</comment></comment></comment><comment><USER6> I started programming in JS then moved to Python. It seems like JS has become very, very complicated. I look at his post and I am lost... I remember Knockout.js and Node in the v0.8 days.

I mean look at this:

      dotenv (lets you load the environment from an .env file), axios
      (HTTP client library), cheerio (HTML parsing library), bcrypt
      (password hashing), co-body (HTTP body parser), co-busboy (HTTP
      multipart parser), jsonwebtoken (JWT generator), koa-jwt (JWT
      middleware), koa-router, koa-sslify, vue-no-ssr and source-map.

What the hell is all that? I am not saying he is wrong... I am just saying that I don't have the capacity to play in that playground. I am also asking if any of those libraries will be around in a year?

<comment><USER7> I have been in your position about a year ago. The approached that helped me, was to not worry about all this.

Just start somewhere; and in a month or two, you would mostly know which libraries you need to add to your project.

The best way to go about it, is to check a few popular open source projects; what libraries they typically use.

> I am also asking if any of those libraries will be around in a year?

You can check the download stats of these in [https://npmjs.com](https://npmjs.com), and activity on the GitHub repo, before adding it to your project.

If they are still around, but have published a new major version to update a few APIs; you can slowly migrate to it.

If not, you'd read some Medium post or Hackernews discussion, about what is replacing that.

There's something called Greenkeeper ([https://greenkeeper.io/](https://greenkeeper.io/)) that integrates a GitHub bot to your repo, and files a PR when something needs to be upgraded.

You can implement something similar on your own, if you aren't interested in using something like this.

<comment><USER8> I mean no offense, but the "just use it you'll get used to it" strategy seems the antithesis of the goal of engineering as a discipline.

A materials engineer simply cannot afford to pick concrete unless she knows the specific load and weathering characteristics of it. The same should be true for software projects. You shouldn't use cheerio because everyone uses it in their project, but because you've looked through the source and considered all your options for need it fills.

Sorry for the rant, but I think it's important to encourage software developers to think before they code.

<comment><USER9> It's important to not disregard the expertise of a fellow developer before you have decisive proof that their approach is genuinely poorly thought out. That is to say: Give people the benefit of the doubt.

As an outsider the big amount of dependencies look daunting, but the tendency in JavaScript as of late has been to use small libraries that do one thing, do it well, and play well together with others (Composable is the buzzword). Whereas Java and C# for instance tend to have macro libs that "Have it all bundled in".

It's different approaches, and you might not _need_ absolutely everything, then again you might, and you are in a much worse position to evaluate that as an outsider than the developer who made it.

All in all, I quite like the JavaScript approach where pieces are just that, instead of a pre-built lego set which I'll have to study to build, I have small pieces which give me more flexibility to take my project where I want to take it. The tradeoff, and they naturally exist, is that dependency maintenance is substantially more difficult, and the likelihood of something you use being straight up abandoned raises for each dependency you add. Which might lead to having you either maintain that piece yourself, or abandon it, and add another piece that fulfills a similar role.

</comment></comment></comment></comment><comment><USER10> > there's no acceptable way to pass a function body to another in Python.

There are sentences which are telling a huge incompetence about the person using these.

This sounds the same story to me as "We used tech X, but X is shit/can't do something so we switched to Y, and Y is awesome and fast." Where the person switching was just incompetent with X but it would have been perfectly solvable and they just do a totally different thing with Y.

In the specific "passing a function" case, yes, it's impossible to pass only a function body, but I think it's impossible to do in JavaScript also? (correct me if I'm wrong), because you pass in function. You can do the same in Python by defining a function in the same scope and passing that in. If you don't like that, it's just one opinion, not necessarily good or bad. For example, I find it ugly and difficult to handle nesting this multiple times (defining another anonymous function inside an anonymous function) which is called "callback hell" if I understand right, but that's just my opinion also, because people seem to able to accept this hell. :)

<comment><USER11> No one likes callback hell but I believe they meant that you can just pass a function expression directly. No need to define a named function. It's the difference between:

      let doubled = nums.map(x => x * 2)

and this:

      def double(x):
        return x * 2
      doubled = map(double, nums)

(my Python is pretty rusty so maybe there's a better way of doing that)

<comment><USER12> You can do the exact same thing in Python, and this is not any new feature:

        doubled = map(lambda x: x * 2, nums)

JS it's just not as explicit with what you're exactly doing.

<comment><USER13> If you want more than a one-line lambda, however, you're in for a rough time, and need to go the route of

        def foo():
            # ... four lines here ...
        modified = map(foo, items)

<comment><USER14> What's rough about giving a function a name?

<comment><USER13> Naming things is one of the hard things in computer science. :) Anonymous functions, when appropriate, let us avoid having to think about that.

For example, `f` is a refactoring of an anonymous function:

        function f (item) {
          return {
            // foo properties
          }
        }
        const fooItems = values.map(item => f)

Imagine that you have to map over several different collections of items, and generating the lists `foo`, `bar`, and `baz`. You have to either name the functions we pass to map `f`, `g`, and `h` (which I bet our reviewers would hate), or `fooMapFunc`, `barMapFunc`, `bazMapFunc`. It just pollutes the namespace that I have to keep in my head, because I have to wonder "is this used somewhere else?".

Moreover, is it _more readable_ to define the helpers first, and then the collections that are made by using them, or to define the pairs (fooMapFunc, fooItems) in sequence? This could easily be felt one way or the other, and both are valid, but leads to code review holy wars. "I feel this is more readable / I feel exactly opposite".

For comparison, the anonymous version of this similar operation:

        const fooItems = values.map((item) => {
          return {
            // foo properties
          }
        })

        const barItems = values.map((item) => {
          return {
            // bar properties
          }
        })

        const bazItems = values.map((item) => {
          return {
            // baz properties
          }
        })

In this case, the anonymous function is clearly not usable anywhere else, so it's easier to be sure that it's something one can change, and completely removes the chance of holy war over readability of whether to define helper functions together or with their collection.

<comment><USER14> Naming things is hard because names represent abstractions. Complex abstractions are hard to get right and hard to summarize; widely-used abstractions and names are hard to change.

A nested function is a simple abstraction in a narrow scope. Both the abstraction and the name are easy to change, so the name only has to describe what the function does now. When that's hard, it's often because the function does too much, does too little, or belongs somewhere else. Likewise, people arguing about the organization of inner functions is usually a sign the outer function should be refactored. Anonymous functions are appropriate when names would be almost redundant, not when coming up with a name is hard.

My editor can show me where a function is used; it can't summarize what a function does. Either way, you have to find where "fooItems" is used to know if you can modify the function.

Conversion functions are very easy to name ("itemToFoo"). Idiomatic Python would just use a loop:

        foo_items = []
        for item in values:
            foo_items.append({
                # foo properties
            })

</comment></comment></comment></comment></comment></comment></comment><comment><USER15> A lot of innovation happened in JavaScript space over the past few years and yet the learning curve is high. I prefer to use Python for Data Analysis, Data Transformations & Machine Learning. For web applications, Node/Express + React/Vue seems to work better.

<comment><AUTHOR> Yep, Python is still king for machine learning.

</comment></comment><comment><USER16> > So with JavaScript you've got arrow functions, the method shorthand > definition syntax, the spread operator, destructuring assignments, all > functional Array methods and async functions.

This confuses me quite a bit, there are nuanced differences between these ideas in the two languages but at the surface these are things that very much exist in both languages

 _arrow functions:_

      (x,y) => { x + y }

vs.

      lambda x,y: x + y

method shorthand definition:

      MyObj = {
          foo(x,y) { return x + y }
          bar(x,y) { return x * y }
      }

vs.

      class MyObj:
          foo(self, x, y): return x + y
          bar(self, x, y): return x * y

_spread operator:_

      function add(x,y) {
          return x + y
      }
      add(...[1,2])

vs.

      def add(x, y):
          x + y
      add(*[1,2])

_destructuring:_

        [a, b, ...rest] = [10, 20, 30, 40, 50];

vs.

        a, b, *rest = [10, 20, 30, 40, 50]

_functional array methods:_

        forEach(["Wampeter", "Foma", "Granfalloon"], print);

vs.

        list(map(print, ["Wampeter", "Foma", "Granfalloon"]))

_async methods:_

        function resolveAfter2Seconds(x) {
          return new Promise(resolve => {
            setTimeout(() => {
              resolve(x);
            }, 2000);
          });
        }

        async function add1(x) {
          var a = resolveAfter2Seconds(20);
          var b = resolveAfter2Seconds(30);
          return x + await a + await b;
        }

        add1(10).then(v => {
          console.log(v);  // prints 60 after 2 seconds.
        });

vs.

        async def resolve_after_2_seconds(x):
            await asyncio.sleep(2)
            return x

        async def add1(x):
            a = resolve_after_2_seconds(20)
            b = resolve_after_2_seconds(30)
            return x + await a + await b

        loop = asyncio.get_event_loop()
        loop.run_until_complete(add1(10))

There's a lot of fun differences between the origins of these features and how they work but the sentence to me doesn't quite to the idea of "Leaving Python for JavaScript" justice

</comment><comment><USER17> Why is all the actual content on the far right side of the page? Even more interesting given that you specialize in UI/UX.

<comment><AUTHOR> Hi, it's just a blog, not a paid job. Not a lot of effort went into it. I'll take a look when I have a chance (it looks fine on my MBP and several others).

<comment><USER18> I don't think it's broken. It just looks pretty cramped and weird if you've got your browser in a portrait orientation.

</comment></comment></comment><comment><USER19> With async/await now landing in mainstream engines, Koa instead of Express, the new Turbofan+Ignition optimization pipeline "evening out" V8's performance characteristics, and ES6 enjoying reasonably broad support, I feel like JS is now crossing a threshold into being not a completely sucky programming experience, which is a sentiment this article echoes.

I'm probably being overly optimistic, but I look forward to a future where a "naked JS" movement rises up, similar to "vanilla JS", but rebelling against tooling complexity instead of jQuery bloat, in which your website's /js/ folder contains pretty much exactly what's in git.

<comment><USER20> I'm split on it myself. I like being able to go Right Click -> View Source and poke around but with more modern sites, you're given nothing but a single JS file. You can scroll through the DOM in developer tools but it's not as neat as text :(

</comment></comment><comment><USER21> > there's no acceptable way to pass a function body to another in Python.

What. Why would you ever want a function body as a string? What kind of vile sorcery are you doing? One can use inspect.getsourcelines in python if really pressed to, but I find it horrifying that javascript developers actually seem to require this functionality often.

<comment><USER22> The author did not say "as a string" and I am extremly confused as to how you read it like that... what? Essentially, the complaint (which is extremely common) is that functions that contain statements are not expressions in Python, so functional coding styles using things like .map() and .reduce() end up fragmented (and you are horribly tempted to play extremely insane tricks with decorators to build something that feels like a Frankenstein Ruby block); this is why the author then brings up arrow functions: it has nothing to do with strings.

<comment><USER23> > the complaint (which is extremely common) is that functions that contain > statements are not expressions in Python, so functional coding styles using > things like .map() and .reduce() end up fragmented

You mean these critics find

        >>> map(lambda x: x**2, filter(lambda x: not x % 2, range(11)))

preferable to the "fragmented":

        def square(x):
            return x ** 2

        def is_even(x):
            return not x % 2

        >>> (square(x) for x in range(11) if is_even(x))

Both result in the same lazy iteration (to see results below - <USER2> materialization with a constructor like list or tuple), but I find the "fragmented" approach much more readable (so long as the functions do what their name says they do - I _have_ seen Python where they actually did the opposite...)

        >>> list((square(x) for x in range(11) if is_even(x)))
        [0, 4, 16, 36, 64, 100]
        >>> list(map(lambda x: x**2, filter(lambda x: not x % 2, range(11))))
        [0, 4, 16, 36, 64, 100]

<comment><USER24> But your lambda example would be more clear if collections functions supported chaining. You can add a small comment if you want to be explicit. This way the code reads linearly, you don't have to wonder why a "square" function and "is_even" function are defined before you see how they are used.

        # square even numbers
        range(11)
          .filter(lambda x: not x % 2)
          .map(lambda x: x ** 2)

However such a chaining API is not practical in python, because lambda syntax is voluntarily crippled to one expression only.

<comment><USER14> Long method chains are impractical in Python because of the line continuation rules. That's orthogonal to the question of whether complex functions should be required to have names.

<comment><USER24> There are a few gotchas but you can do it. Mostly you need to put you multi- line chain call inside parentheses if it is not already inside a function call or data structure (similarly to generator expressions).

For example I often end up doing:

        something(
            "Template string {thing}"
            .format(thing=33)
        )

<comment><USER14> It's _possible_ but rarely more concise or clear than just using variables.

        label = "Template string {thing}".format(thing=33)
        something(label)

<comment><USER24> I guess it is a matter of preference at some point.

Storing each step in variables has the advantage to be self-documenting and nicer when debugging. However in many cases I feel like wasting energy trying to find short and adequate variable names for each steps in a computation, especially when the steps are clear enough by themselves but difficult to describe in 1-2 short words.

You also need to keep the variable names in sync when refactoring, which may cause even more refactoring if the line gets too long with the new name.

IMO it makes sense to use both styles where they feel most adequate.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER25> I want to like JavaScript, but the type coercion land mines and the lack of a real numeric tower make me a little queasy. When I have to use JS I stick to the transpile-to-js languages mostly for those reasons.

<comment><USER26> Is TypeScript one of your goto "transpile-to-js" languages? I'm a Python developer who is learning to love TypeScript. With TypeScript I feel like I can write maintainable, collaborateable JS.

<comment><USER25> TypeScript has the same number problem that JavaScript has.

</comment></comment></comment><comment><USER27> ES6+ javaScript in absorbed many great features from python: destructuring vs. tuple unpacking, spread (...) vs *args argument unpacking and generators. Many things I enjoyed in python are now also idiomatic javaScript. Only thing missing is function decorators:

        @connect(...)
        function StateLessComponent(props) {

        }

</comment><comment><USER28> I did the move but to GOLANG instead.

I think what is more important than the language it self, is the toolings and standard library.

every now and then you hear about a new framework, a lot of hype, which is not for big projects.

I think the wise thing is to move to golang

<comment><USER6> Why? I mean please elaborate.

</comment></comment><comment><USER29> > So with JavaScript you've got arrow functions, the method shorthand > definition syntax, the spread operator, destructuring assignments, all > functional Array methods and async functions.

In language that pythonistas would grok:

Arrow functions: multiline lambda definitions

method shorthand definition syntax: class defined with only classmethods, or in other words a namespace

the spread operator: *args in functions

destructuring assignments: tuple unpacking... But also for creation of instances

all functional Array methods and async functions: functools and async... Plus a bit more

While most of this is good to know, I'd still stick with python for readability and maintainability purposes.

<comment><USER30> IMO arbitrary rules like lambda expressions being limited to one expression do not directly improve readability and maintainability. Consistently using good conventions in the first place will help you more than arbitrary restrictions.

And to be clear, I would classify, say, Rust as not having many arbitrary restrictions. All the limitations that Rust has compared to C fit clearly within the language's core design. On the other hand, I don't see this same structure and consistency to some of Python's rules.

<comment><USER31> > IMO arbitrary rules like lambda expressions being limited to one expression > do not directly improve readability and maintainability.

In Python's specific case, I've seen no alternative that isn't bad for readability; the strong line-orientation of Python's broader syntax limits the good options for inline anonymous functions.

That being said _complex_ lambdas in general can be adverse to maintainability and Python's single-expression limitation largely prevents that (though you can make hideously complex opaque single-expression lambdas if you try.)

</comment></comment></comment><comment><USER32> If you started with php instead of python you would never have left.

Vue is a great language but php can offer more in the backend

</comment><comment><USER33> Thanks for your article. It's really helpful to hear about the technologies that have been used in actual projects/production environments. I'd love to hear more about what diminished your excitement with ElementUI vs iView

<comment><AUTHOR> Mostly aesthetics in the default theme. Both are actively maintained and the APIs are super similar.

</comment></comment><comment><USER34> When reading these "Leaving X for Y" I first think that maybe some people are unable to fluently use more than 1 language.

Seriously, professionality is being able to use the right tool for the job at hand.

</comment><comment><USER35> why is the sidebar on the left half the width of the page? I can hardly read the main content crammed into the right half.

</comment><comment><USER36> > _the spread operator_

How?

JS:

      var args = [0, 1, 2];
      myFunction(...args);

Python:

      args = [0, 1, 2]
      myFunctions(*args)

A more complicated one:

JS:

      var args = [0, 1];
      myFunction(-1, ...args, 2, ...[3]);

Python:

      args = [0, 1]
      myFunction(-1, *args, 2, *[3])

As used in list building; JS:

      var parts = ['shoulders', 'knees'];
      var lyrics = ['head', ...parts, 'and', 'toes'];

Python:

      parts = ['shoulders', 'knees']
      lyrics = ['head', *parts, 'and', 'toes']

"A better way to concatenate arrays"; JS:

      var arr1 = [0, 1, 2];
      var arr2 = [3, 4, 5];
      arr1 = [...arr1, ...arr2];

Python:

      arr1 = [0, 1, 2]
      arr2 = [3, 4, 5]
      arr1 = arr1 + arr2

(Though the star notation works here too.)

I omit JS's use of ... on objects; Python's class system works differently — and IMO, more rigorously — than JS's, making ... less sensible on Python objects. (Python focuses much less on passing around untyped key-value bags and more on strongly typed classes IMO; both are possible in both languages, but the idioms around them differ, and I think Python's idioms tend more towards having a well defined class with well defined attributes, and not having just a bag of attributes, moreso than JS at least, and I feel that direction (well defined classes) leads to more robust code. In particular, it forces you into naming your concepts, and defining their set of attributes: a simplistic type definition.)

> _all functional Array methods_

Python has map, reduce, etc., as well as generator and list comprehensions which are often easier to use.

> _async functions_

Python and JavaScript have practically identical syntax in this area.

> _there 's no acceptable way to pass a function body to another in Python_

I find it very acceptable that if your function body is more complicated than an expression, that you're forced to pull it out and name it, frankly. I think it does good things for fighting complexity, and this just isn't something I worry about day to day while using Python. But I will concede that Python does lack a syntax for passing a function in an expression context.

(But I would also note JS's screwed up named-function syntax; in Python:

      def foo():
        # body

is a valid statement. JS's:

      function foo() {
        // body
      }

is _not_ a valid statement, and can only appear in certain, particular contexts. In particular, the following is not valid JavaScript, though many implementations will do The Right Thing™, I'm told:

      if(true) {
        function foo() {
          // body.
        }
      }

[2])

> _My code usually revolves around higher order functions, reduce(), map(), > etc. I can 't remember the last time I wrote a regular for loop in > JavaScript._

Because JS for a long time (until ES6's for(… of …) syntax) lacked a for loop (the C style look, and for(… in …), do _not_ count, as they do semantically different things), which is why you're using forEach().

> _arrow functions_

The best thing about arrow functions is the sane binding of `this`, a problem notably absent in Python to begin with.

> _[Python 's] class definition boilerplate is still hard to look at_

This is sometimes true; I find the attrs[1] package helps greatly here for small, struct-like classes.

[1]: [https://pypi.python.org/pypi/attrs](https://pypi.python.org/pypi/attrs)

[2]: [http://kangax.github.io/nfe/#expr-vs- decl](http://kangax.github.io/nfe/#expr-vs-decl)

</comment><comment><USER37> Poor misguided person

<comment><USER38> I use to read hacker news and feel that all the articles were by people infinitely smarter than me. Nowadays I occasionally hit something like this. The fact that this makes it to the front page means many programmers are equally misguided...

</comment></comment><comment><USER39> Just in case the author is present in the thread:

Your blog is extremely difficult to read on wide screen monitors. The entire left 50% is basically just blank space. My suggestion is to make the left side maybe 20% width on desktop or less.

Also, regarding the article content:

There really aren't any good reasons presented here about why you moved from Python to Javascript for back-end web development. It seems that you simply prefer Javascript semantics. There's nothing wrong with that, but the title is misleading considering that the bulk of the article is actually about which JS tools you use on recent projects and not why you moved.

Also, could you clarify what you mean by

> Also, there's no acceptable way to pass a function body to another in > Python.

Functions are first-class in python and can be passed as arguments to other functions. I'm not sure I understand what you mean with the above statement.

Cool to see someone else has been using Nuxt though.

<comment><AUTHOR> > Your blog is extremely difficult to read on wide screen monitors. The entire > left 50% is basically just blank space. My suggestion is to make the left > side maybe 20% width on desktop or less.

Thanks, I'll take a look when I have a chance. I myself don't own a widescreen monitor, the site looks fine on my MacBook and several other computers. It's not a paid job, not a lot of effort went into it ;)

> but the title is misleading considering that the bulk of the article is > actually about which JS tools you use on recent projects and not why you > moved.

Hm, actually, it's not. I'm surprised by this comment. I point out precisely the JavaScript features that weighed the most in my decision: "So with JavaScript you've got arrow functions, the method shorthand definition syntax, the spread operator, destructuring assignments, all functional Array methods and async functions. Combined with Vue's minimal patterns and Nuxt's conventions, I can't think of a better language to write web applications in."

> Also, could you clarify what you mean by > > Also, there's no acceptable way > to pass a function body to another in Python.

Exactly that, a "function body", "closure", "inline function", whatever you wanna call it. In Python there are lambdas, but they're limited and not even encouraged anymore. We're left with passing function references, and that's where JavaScript comes out the winner IMHO.

<comment><USER14> "Anonymous function" is the term you're looking for. Lambdas are still encouraged for trivial functions; the only thing that's changed is that comprehensions have replaced many uses of map and filter. Python just requires you to name non-trivial functions.

IMHO, complex/nested anonymous functions are usually bad for maintainability, so I'd rather have a language that doesn't allow them (Python) than a community that overuses them (JavaScript).

<comment><USER39> I couldn't agree with you more. I think that Python's lack of complex anonymous functions actually forces the programmer to compose their code in a more efficient manner.

</comment></comment></comment></comment><comment><USER40> I am still learning to like Javascrip and its ecosystem. I do not think I would be able to invest time in transpile-to-js language (looking at you TypeScript). I really hate the evolving ecosystem, hyped libs / frameworks and tons spaghetti new paradigms.

<comment><USER30> >I really hate the evolving ecosystem, hyped libs / frameworks and tons spaghetti new paradigms.

Then don't use them. The javascript ecosystem on the backend and frontend has settled down quite a bit. Use something that's been established for a while (React, Vue on frontend or Express, Koa on backend) and you're not gonna suffer from churn too badly.</comment></comment>


Please Review My Website - <AUTHOR> https://nbalivecoinstores.com/ <comment><USER2> You're loading 5 (horribly designed) images, 400KB each, and they look almost identical besides the (ugly) white text on top. Obvious optimization is obvious.

You also claim "#1 Website for NBA Live Mobile Coins", which is a lie.

<comment><AUTHOR> hmm ok</comment></comment>