Log driven programming (2013) - <AUTHOR> http://antirez.com/news/51 <comment><USER2> [https://orgmode.org/manual/Capture-_002d-Refile-_002d-Archiv...](https://orgmode.org/manual/Capture-_002d-Refile-_002d-Archive.html#Capture-_002d-Refile-_002d-Archive)

> An important part of any organization system is the ability to quickly > capture new ideas and tasks, and to associate reference material with them. > Org does this using a process called _capture_.

<comment><USER3> This, and it's something baked into Spacemacs (easy to replicate with a vanilla Emacs, thought): working within a projectile-initialized folder, hitting <leader>po will open a TODO.org at the root folder of your project, where you can write anything you want (including inserting an Org-mode link to the file/line you were editing), and save/switch back to your file in a handful of keystrokes.

Downside: you end up with too much notes.

</comment></comment><comment><USER4> I use postits for this.

I used to use TODOs, but then if I wasn't looking at the code I forgot about it, and a lot of the stuff didn't have a spot it needed to go. It was just stuff I thought about while I was doing something else.

Daily (or twice daily) I reorder and prioritize. Every week or two there's a postit cleanup party where old postits get trashed or logged. A lot of the stuff that I trash isn't bad....it's just not in scope for the stuff I'm currently doing.

ADD: One of the beauties of postits on my monitors is that when my mind wanders -- as it tends to do -- I'm naturally looking at other stuff I should be thinking about. So when I postit stuff and put it somewhere in my field of vision, I'm telling my subconscious to start working on what I want to do with this stuff.

</comment><comment><USER5> A couple of years ago I started using TODO:HIGH, TODO:MED and TODO:LOW.

TODO:HIGH is for things that need to be completed for the current feature or bug fix.

TODO:MED is for things that should be completed before the next public build.

TODO:LOW is for stuff that would be good to get done eventually. (A function is complete but doesn't read well so I'll add a note to refactor it at later date.)

When writing new code I try to get something up and running ASAP by filling in functionality with broad strokes. I'll go back and fill in the details once the larger picture is in place. With less code written, it's easier to refactor (or restart), if the design is not quite right.

Writing lots of TODOs helps ensure nothing gets forgotten about.

Picking an easy TODO from the backlog can be good way to warm up when starting the day too.

I'm used to working solo however. Not sure how this approach would go down on a team.

<comment><USER6> Exactly. I don't see why you would do this in another application. Doing it in another application means you also have to take note of _where_ the piece of your TODO is. That means filename and line number?

While I don't use priorities, I do liberally use "// TODO: <problem statement>" if it's something I need to do that takes me out of the current problem. Then when I'm finishing up a feature or bug fix, I just walk past the list of TODO's.

A recent example would be: On this new project I was on, while implementing a feature, I didn't know how resource files were handled yet -- so I hardcoded some strings with a "// TODO: Put these strings in resource files". Researching the way resource files are handled will pull you out of the current problem, while it's something that can easily be solved later.

</comment></comment><comment><USER7> This is my workflow and has been for the past 10 years or so.

Whenever you think of something else that needs doing, write it down so you stop feeling the need to keep it in mind.

<comment><USER8> Excellent; but does it ever get done?

<comment><USER9> Yes. In particular, if you use the same place to note down things you want to do in the first place. Then it boils down to continuously reviewing the list and picking the next thing to work on.

<comment><USER10> This is a reason why I generally avoid using TODO/FIXME type comments in my code. I'm much more likely to forget about them, whereas I always need to look at my org-mode project file to see what I need to do. So that's where I put them.

</comment></comment></comment></comment><comment><USER11> Ostensibly, this is what TODO comments have always been for.

Realistically, I guess it's probably better that these types of comments remain out of the code itself unless you and your team can practice proper rigor around them, e.g. using prehooks to enforce that no TODOs are left around before committing or merging.

<comment><USER12> > _I guess it 's probably better that these types of comments remain out of > the code itself unless you and your team can practice proper rigor around > them, e.g. using prehooks to enforce that no TODOs are left around before > committing or merging._

Why? If they're "out of the code" they still can be ignored before committing or merging just as well...

<comment><USER11> I'm more likely to write a stub implementation around more complex behaviour that still functions in a minor way first, especially if I want to observe that some component functions even in absence of a complete implementation of another component.

<comment><USER13> My personal layers of organization:

Stubs with TODOs for staking out an interface to be implemented later and the like. Almost always doing "git add -p" is a good way to jog your memory about these. They can be committed but probably shouldn't survive until a merge into master.

A todo file entry for items which are heftier and/or not likely to be returned to today. My todo files are date-based so I try not to add todos for items with a time horizon beyond about three days in the future. I also try to keep these files small enough to actually get through in a day.

A single wish list/ideas file. Keep it in approximately priority order and pull items from the top when you finish your daily todos. This is also often feature-based so a single line might generate a bunch of tasks. Biased towards a personal backlog instead of "just add to JIRA/Trello/whatever" to avoid eternal agile deprioritization hell.

Works fine for me, though of course I'm not out here writing Redis either.

</comment></comment></comment></comment><comment><USER8> Yep, a notepad with a direct step by step 1 liners is very effective to get a ton done in one day.

Have it between you and the keyboard so it can't be ignored, presumably not ruining your typing experience.

Straight up notepad or sublime works too.

<comment><USER14> "Straight up notepad" means notepad.exe nowadays? That is really interesting

<comment><USER8> Haha, thank you for making me feel young for a minute :-)

</comment></comment></comment><comment><USER15> I find it best to put a TODO file in the project that I'm working on. Sometimes I commit it, sometimes I hide it from git. I think it's a big advantage to have it all in one place, not very far from the code, and it won't get lost.

TODOs in comments end up getting forgotten about. Bug ticketing systems are too much work for the kind of notes I write to myself. I've tried using paper, but as I turn pages, notes on previous pages get lost forever. Staying in the text editor helps me not lose my flow.

</comment><comment><USER16> > For my log I use Evernote because the log needs to have one characteristic: > No save, No filenames, Nothing more than typing something.

I got emacs configured with a keybinding to open org files by date name (e.g. 2018-10-08.org), with the current date selected by default, creating them if they don't exist. I use `(org-read-date)` so I can, for example, get yesterday's notes with syntax like "-1d" or select it from a 3 month calendar. It frees me from having to think of a name for the notes I want to take and simply make a log of notes. It also autosaves.

        (defun find-diary-file ()
          (interactive)
          (find-file (concat "~/org/diary/" (org-read-date) ".org")))

        (global-set-key (kbd "C-c d") 'find-diary-file)

</comment><comment><USER17> For those unaware, the author of this article (Salvatore Sanfilippo) is a prolific programmer and leader in open source. He's been very productive in this role, authoring systems that many use today, such as Redis.

Obviously, Salvatore didn't invent a new creative workflow that he's branded "log driven programming". His intent with this article more likely was to share with others how he works productively. I can imagine that people asked him how he gets so much work done, considering how complex programming is, especially low level systems programming in C.

While the article was written in 2013, it shares timeless advice.

</comment><comment><USER18> Had the same idea as I noticed that working in a nested way slowed me down a lot. Been trying to do this but I often lack the discipline to actually work this way and not dive into the local improvement I just thought of.

</comment><comment><USER19> I use TODO and FIXME for this. This way, it's directly anchored to the relevant code. Both the IDE and the build server produce a list when asked.

Every project has a readme attached for bigger notes

</comment><comment><USER20> This is essentially the process that Things 3 (I'm not affiliated in any way) for MacOS/iOS uses. It separates adding new tasks (for your inbox) from the step of organizing and scheduling them. So if you think of something you need to do, you can use a keyboard shortcut to pull up a prompt quick add it (from whatever app you're using) and carry on with whatever else you're working on.

</comment><comment><USER21> I wrote a simple app for myself for this: it's basically a text editor with included checklist UI, optimized for a keyboard based workflow. I find it very useful to have a "conversation" with my notes while I'm developing to avoid going down too many rabbit-holes, and to keep focus on the primary task.

</comment><comment><USER22> I usually just make the additional changes but I'm pretty good at keeping pretty massive mental models in place while I do so with out interrupting my work flow. If it's something truly massive i add a @TODO ... @PRI-N line in the comments.

</comment><comment><USER23> How is something as frivolous as taking notes while programming, which many people do, worth a blog post and a mention here on HN? Let alone turning it into some dogmatic principle to work by, by calling it 'log driven' programming. What is next? Keyboard driven programming? 3-monitor-driven programming?

I do this:

While programming it pays off to stop and think about the code. I call this, thought driven programming.

<comment><USER24> Over the past 20something years of being a developer I've found there are _a lot_ of things that seem obvious to me now that junior developers don't do by default. Looking back I wonder when I started doing all these obvious things. Presumably, if I didn't discover them myself, it was when I was told about them or I read about them. If no one is writing these "frivolous" things down then how will juniors learn?

If this helps a few new devs who don't have access to a good mentor (because, say, their mentor makes assumptions about what's obvious..) to tell them about this idea then it's automatically a useful post.

<comment><USER25> The best habit that any developer can have is _reading code._ It's shocking how few devs spend time reading code; whether the code is from library dependencies or entirely unrelated third party projects, I always learn something new just by reading it.

Not every developer is blogging their best practices. If you want to see them and learn from them, the best place to look is in the code.

Honestly I think we should be reading at least 10x the amount of code we write. For every novel an author writes, how many novels do you think they read? Certainly more than ten. Why shouldn't we do the same? In a world awash with open source code, there is really no excuse not to be reading as much of it as possible.

<comment><USER26> There are two interesting parts to reading code.

      - Working out what it actually does, and why

      - Working out why somebody *wrote it in that way*

The former is usually not too bad. Occasionally there will be a comment to help with the latter (although rarely ime). The latter is basically impossible. I can ask 3 other devs, they'll all disagree. Some like the style, some hate it. Each will complain about different aspects, and none of them would write it quite the same for ~reasons~

Maybe it's just me vOv

</comment></comment></comment></comment><comment><USER27> Sliderule</comment>


Netbooks are the new Razor Scooter - <AUTHOR> http://www.manyniches.com/developers/netbooks-are-the-new-razor-scooter/

<comment><USER2> I love my netbook for web apps - running FF in fullscreen mode gives you a solid extra inch of screen real estate and when I'm chilling on the couch after work The tiny form factor is actually pretty handy. Plus, the price is such that I don't feel like I need to think twice about taking it with my everywhere on the off chance that it might get dropped/stolen.

It's also the ideal device for streaming Hulu or Netflix before bed.

<comment><USER3> I bought my laptop for $90 from Free Geek (50% off for volunteering there) and use it much the same way you're using your netbook, albeit with a larger screen and (more importantly IMHO) a larger keyboard.

<comment><USER2> I've actually adapted pretty well to the keyboard. I'll be honest, I hated the computer for the first 3 months, but now I've found a lot of uses for it that I'd never use a larger, more expensive laptop for.

Tethered to, my treo I've got a really trouble free and reliable internet connection at the drop of a hat anywhere in the country which is also pretty great, but I guess you could really do that with any laptop.

</comment></comment></comment><comment><USER4> well, i disagree with some of the points of the article as a netbook owner ($350 1000HE)

the battery life issue is dubious. my netbook with default battery lasts for about 6 hours. its advertised at about 9, but thats at low settings, i need a brighter screen. but the point is, 6 hours is still long, much longer than the reported "at most 2".

talking about how netbooks have problems running a lot of programs or powerful programs is obvious. of course an atom processor and 512 of ram is going to have problems with outlook and eclipse open. netbooks aren't designed to replace full powered computers. they're designed to run simple stuff and web apps. if you need more, don't buy a netbook. don't try and roll your razor scooter down the interstate.

screen res and quality is valid, but you kind of get used to it.

<comment><AUTHOR> My netbook has 2GB of RAM. The proc is limiting, and I suspect the network throughput (and associated proc hit) are constraints as well.

I found myself want the small form factor more than the experience. A refurbed MBP was a nice price point, though more expensive, but a much, much better experience for day to day use. But that's just me.

<comment><USER5> I like my netbook and didn't encounter the issues you are describing. Battery life is 4.5 hours, which is quite ok-ish, and the new EEE netbooks have 8+ hours.

The cpu speed is also ok, although i don't play games or process very large files. And, Atom dual core is comming...

Regarding the screen real estate, 1024x600 on 10" is enough for me. I did some customizations in apps, for example in Firefox I use Tiny Menu extension, so all my navigation buttons, menu, and URL box is nicely placed in just one toolbar, and statusbar is switched off. Or in Microsoft Word (my second most used program), I usually write in full-screen mode. So you are right, no ribon for netbooks. ;-)

I think it comes down to personal preference. I've been a "desktop guy" and never owned "normal" laptop...I just consider it too heavy to carry. I also don't own a smartphone, since I don't find it necessary. The combo powerfull desktop + netbook does it for me.

</comment></comment></comment><comment><USER6> Many of the author's problems can be solved with a minimalistic linux distro and a lightweight window manager.

From my own experience, an MSI wind has great battery life running Arch (around 5 hours, minimum). And xmonad allows one to make good use of the display (no annoying toolbars, ect...)

<comment><AUTHOR> I love this answer. Yes, it is true that you can solve the problem with light weight linux distro, but the mass consumer market has rejected linux on netbooks.

<comment><USER7> Don't you at least fancy yourself cleverer than the _mass consumer_?

EDIT: Oh duh, you work for Microsoft!

<comment><AUTHOR> I love that answer even more! :) My profile makes it pretty clear I work for MSFT. I spent 9 of the last 10 years doing LAMP development. My home machine is a MBP 13". So yes, I am more clever than a mass consumer. However, I am not a fan of Linux for desktop. I will take free-bsd based OS X over any linux distro, but that's a personal preference.

<comment><USER8> I doubt the GP wanted to insult your intelligence, he just noted that your opinion was in line with your employer's position ("Linux is a cancer" a few years ago, iirc?).

If it was just a consumer choice that Linux died on the netbooks, then I should be able to at least order a new (not used) one with Linux from Amazon.co.uk. I had problems finding one a few weeks ago.

Edit: It was in 2001 Linux was named a cancer.

Edit 2: The last few years, articles/blogs have been discussing pressure on netbook manufacturers to not ship Linux.

A random Google: [http://blogs.computerworld.com/microsoft_strikes_back_at_lin...](http://blogs.computerworld.com/microsoft_strikes_back_at_linux_netbook_push)

>> ... PC World, Britain's self-professed largest specialist chain of computing superstores, announced that, regardless of what was coming with Linux netbooks, it would only be selling Windows netbooks.

<comment><USER7> You're right, "rejected linux on netbooks" was one of Microsoft's PR pushes, and I was simply noting that Brandon did not internalize that opinion in a vacuum.

It used to be that Linux netbook models cost less and/or had higher specs than the XP versions. Then Microsoft offered deep discounts for XP licenses, and added draconian restrictions on what specs you can ship. Why the hell else do you think every goddamn netbook ships with a 1.6ghz Atom, 160gb HD, and 1gb ram?

<comment><USER8> >>I was simply noting that Brandon did not internalize that opinion in a vacuum.

Ah, you are right. Brandon wouldn't quote marketing that would get his wrist slapped on HN. That means he really believed the quite obvious company propaganda. Fascinating.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> I think the OP fails to understand what a netbook is for. It's not your primary PC, it really does do a lousy job for that. And when trying to do so, it is going to have poor battery life, and performance problems executing demanding software.

But as a highly-portable tool for note-taking, i.e, "book" and quick access to webmail and calendar, i.e., "net", it's satisfactory.

Not that it's great, but I don't think the items cited are the faults. My biggest complaint is that note-taking can be tough because of the cramped keyboard.

<comment><AUTHOR> I dont use it as a primary PC. I use it for travel and meetings. Nothing more. I couldn't get used to all of the issues I laid out. It was a very painful experience. The most common apps open on my netbook were Outlook and IE/FF.

</comment></comment><comment><USER10> Yes, it's over-hyped as much as the Razor was but these days every kid on our block has a Razor and plays with it and I'm sure the netbook will become just as ubiquitous.

No, it doesn't solve your problem but it's perfectly suitable in others; I have a 1005HA and love it! I use it primarily to write and when bored I can play Diablo II or even World of Warcraft. No, it's not going to play the latest FPS but I didn't buy it for that.

<comment><AUTHOR> You plat WoW on a netbook? For real? Screenshot! What res and fps?

<comment><USER3> WoW runs on almost anything... I have a refurb T43 (X300 + 2.0Ghz Pentium M + 512 MB RAM) and with settings dialed down, at 1024x768, I get at least 20 fps - haven't installed fraps here so I don't know the exact fps. RAM gets tight, but XP Pro uses max 160MB right now :)

</comment></comment></comment><comment><USER11> I use my netbook whenever I travel - I can write articles and do moderate amounts of software development

It is also cheap enough that I am not too concerned with it getting lost or broken

I get a legitimate 4-5 hours of battery life (tested - I fly Hawaii to Los Angeles)

Genius headline though. Caught my attention. _sigh_

</comment><comment><USER12> Screen res is not an issue for me. I always plug into a desktop monitor when I'm at home or the office (usually with a KVM switch). When I'm on the road, I'll gladly trade off the size and weight for screen size.

</comment><comment><USER13> Netbooks rule on airplanes. That's why I got mine.</comment>


Most Passports Used by Dubai Hit Squad Members Appear to Have Been Counterfeit - <AUTHOR> http://blog.newsweek.com/blogs/declassified/archive/2010/02/24/most-passports-used-by-dubai-hit-squad-members-appear-to-have-been-counterfeit.aspx <comment><USER2> I haven't read any detailed descriptions of what passport the assassination victim used to enter Dubai, but I think there is no doubt that it wasn't a passport in his real name. Is it really news that people who cross borders to engage in illegal activity tend not to use the names on their birth certificates as they cross those borders?</comment>


It's Official: Sirius-XM Gets Thumbs Up From FCC (Finally) - <AUTHOR> http://www.alleyinsider.com/2008/7/sirius-xm-gets-thumbs-up <comment><USER2> This process was ludicrously long; it's shameful that the FCC allowed this process to be so politicized.

I'm interested in seeing what the share price of the stock does on Monday - it's plunged on every bit of positive news in the past four or five months.</comment>


Tracking a Bluetooth Skimmer Gang in Mexico (Part I) - <AUTHOR> http://krebsonsecurity.com/2015/09/tracking-a-bluetooth-skimmer-gang-in-mexico/ <comment><USER2> While waiting for part 2, I'm wondering if this is not a very dangerous thing to be investigating. Working in a foreign country with criminal organizations (though maybe less in tourist parts of Cancun) and actively and personally interfering with a presumably lucrative funding source of said organizations seems like a bad idea.

Is this just my US-centric view of the world saying this or is it really a questionable move if one values their personal safety?

Anyway this is very much the topic of more than one novel I'm sure and given he has survived to blog the tale I guess I can be less concerned about his welfare.

<comment><USER3> Is it dangerous? absolutely. But, consider: he is just checking and fixing ATM machines and notifying people of the hack, is not like he is pointing fingers at anything more than "bought out" low-level technicians, and he is a relatively well known American journalist. It is also a super touristic destination where all parties (legit, criminal and semi-criminal) make their money only contingent on it being known to be a "safe destination". Would a criminal enterprise benefit of harming him? Or would it be easier to wait, let him debug all the ATMs he wants and then get a different model of bug and start again 1 month later with what is probably one of many revenue streams for whomever is in charge?

Mexico is a very dangerous place for journalists and becoming more dangerous every year, but even when we hear about _Mexican_ journalists getting murdered, it's usually for pointing fingers much higher up than "ATM hackers" (the most famous recent case has to do with an investigation into a Governor's activities). One has to assume the threshold for causing an international incident is even higher. The people being busted here are "just" scammers, even if embedded within a larger criminal network.

p.s. My only qualification for answering this is having lived in Mexico. I claim no knowledge of criminal structures there other than what is known from general news and culture. I would not bet my own life on this analysis.

<comment><USER4> > But, consider: he is just checking and fixing ATM machines and notifying > people of the hack,

He is depriving a criminal gang of a source of income. That feels risky!

<comment><USER3> Sure. Just saying, there is risky and then there is _risky_. One wouldn't be all that safe doing this in Detroit either. I just think there are way scarier people out there for which "American Journalist found dead in an alley in Cancun" in the newspapers is _not_ an acceptable mess to have to clean, not over something like this. Not that I would bet on it, though...

</comment></comment></comment></comment><comment><USER5> Well, they weren't that sophisticated if they left the bluetooth device transmitting. Pretty stupid if you ask me.

If it were me, I would have either:

1\. Require a secret pin to be entered in order to activate the bluetooth. 2\. Don't use bluetooth. For example the nRF51822 chip (e.g. in this module [1] allows you to implement your own radio protocols. You could make it impossible to detect - it could only respond when send a secret code of some sort.

[1] [http://www.seeedstudio.com/depot/Seeed-Micro-BLE-Module-w- Co...](http://www.seeedstudio.com/depot/Seeed-Micro-BLE-Module-w- CortexM0-Based-nRF51822-SoC-p-1975.html)

<comment><USER6> Criminals do not care for sophistication nor gimmicks. They use the easiest way to get what they want. This current method has probably worked very well for them, and if it was not for 'Krabs' maybe it would have continued for even longer. Hindsight is 20/20\. I am sure the criminals are reading the blog post and looking for the next slightly better method just enough to evade discovery.

<comment><USER7> I in fact wonder about the criminals who've already thought of all this, are successfully avoiding anything like this detection and making their $$$. I hope not to fall prey to something like this, incredible just how many risks there are.

</comment></comment></comment><comment><USER8> Why can't we get ATMs with chip slots so that we don't have to present a skimming device with a nice long swipe?

And once more I consider scraping the mag-stripe off my debit card.

<comment><USER9> It sounds from the blog post like this skimming device is reading the electrical signal from the card reader, not reading the mag-stipe directly. So it's unclear how much this would help.

I would think chip and pin should mitigate this kind of card skimming though...</comment></comment>


Google's logo dives 20.000 leagues under the sea - <AUTHOR> http://newsgrange.com/googles-logo-dives-20000-leagues-under-the-sea-with-accelerometer-support/

<comment><USER2> I thought this was cool so I looked at it. Other than moving the backgrounds up/down left/right there's also -moz-transform and -webkit-transform. Their attention to details is impressive each time :)

<comment><USER3> Did you notice that it uses accelerometer data? That's the most impressive part to me.</comment></comment>


Applying the K.I.S.S. principle to social network feeds. What do you think? - <AUTHOR> http://www.simplifysocial.com

<comment><AUTHOR> Hey guys. I'm nearly done hacking up a simple tool that lets me easily stay on top of the social feeds of people I care about without having to filter through everyone else's updates. Basically, I've got aggregated Facebook, Twitter, and Tumblr feeds for 3 close friends sent to my inbox every week. Curious to know if this would be useful for anyone else. If there's interest, I'll iron out the minor bugs, make it look pretty, and release it as a public product.</comment>


Show HN: Open AWS Catalogue – Curated Reference of the Best AWS Content - <AUTHOR> https://aws.dendron.so/ <comment><AUTHOR> Author here. The Open AWS Catalogue is something I wish I had when I started out. Its meant to be a reference to EVERYTHING that you would need to work with AWS. Currently there's still a bunch missing but it should give you an idea of what it will become

The catalogue is generated using dendron ([https://dendron.so](https://dendron.so)), an open source note-taking tool that I've been working on.</comment>


Python overtakes JavaScript as most questioned language on StackOverflow - <AUTHOR> https://www.globalapptesting.com/blog/picking-apart-stackoverflow-what-bugs-developers-the-most <comment><USER3> Gah, those wordclouds are horrible attempts of analyzing "what the questions are about". There is no attempt at normalizing term frequency, or removing non-informational words. So words like "get" and "using" get a high score.

It may also seem that the text analyzed is the entire post including metadata. For instance "closed" and "duplicate" both show, maybe just be because of "closed as duplicate"... Maybe even including the answers. Which could explain why "pip" would show up so often.

The summaries are also pretty off. "vector" mostly because C++ is about 3D graphics vectors? No, probably just a whole lot of std::vector...

<comment><USER4> Some of the simple words and their prominence can be amusingly informative, though.

Take data structures for example. "string", "array", and "object" are about as equally prominent in both JavaScript and Ruby (where the dictionary is called "hash"). In Python, however, "string" and "list" far outweigh "dictionary" and "object", which probably says something about what kind of data structures Python developers deal with the most in their lives. Meanwhile, C# and Java seem to be all about strings -- Are people just casting everything to string because they don't want to deal with strict types? -- and PHP is the only language where more people feel like they need to ask about arrays than they do about strings. Which is not surprising since PHP uses arrays for basically everything.

<comment><USER5> > In Python, however, "string" and "list" far outweigh "dictionary" and > "object", which probably says something about what kind of data structures > Python developers deal with the most in their lives.

This statement is not true at all. There are plenty of developers that don't post questions to or answer questions on StackOverlow.

<comment><USER6> Not saying anything about the parent comment, but the method of studying a large population by using a sample size is pretty common and time tested.

<comment><USER7> Yes, but SO participation is self selecting (self-selection bias), and is not a random sample of the larger union of non-SO and SO population.

<comment><USER5> And the 'statistics' on the data was presented as a word cloud, which is not a time-tested way to understand statistical relationships.

</comment></comment></comment></comment></comment></comment><comment><USER8> Seems like the most difficult programming is no longer cache invalidation and naming things. Its now about strings, and to duplicate arrays ... The stats are skewed because hordes of beginners. Mainly driven by what schools teaches and what languages has the most hype. That said Python _is_ huge . Damn you significant white space.

<comment><USER9> I often say that Python is the best at nothing, but pretty good at most things. And hence it became huge by the sheer appeal of being versatile. Life is short and most people needing to program are not programmers. Also many programmers didn't start as such, and were simply looking for an easy way to solve a task.

<comment><USER10> There is a bit more insight to be found by reversing that - Python is simpler than other programming languages and achieves that by sacrificing a little power.

Compare it to C, which it has displaced as an introductory language. Python and C are superficially interchangeable to a beginner, but to learn C you have to invest time into pointers and memory management. Python sacrifices the efficiency of direct memory management to avoid the complication of pointers. Arguably, this is a significant benefit because it also cuts down on ways to introduce bugs.

Compare it to a Lisp - Python has a pretty inferior set of basic capabilities (can't even use a dict as a dict key, drives me mad), but that just means there is only one easy way to do things that everyone uses. Less room to think up clever ways of doing things, less complexity reading other's code.

Being the 'best' language for a task has a huge cost - incidental complexity created by including specialist constructs. Python's success suggests maybe programmers prefer this complexity to be encapsulated in a library rather than the language core.

<comment><USER11> > can't even use a dict as a dict key

Curious, is this actually something you want to do often? While there is no hashable+immutable frozendict ala frozenset, you could throw one together or even define a hash function on a subclass and "swim at your own risk" not to mutate it later.

I've encountered this enough with lists and the obvious solution is to cast them to tuples. Can't say I've found the same with dicts tho.

As for the comparison with lisp - in most lisps this is a non issue because nearly all structures are immutable

<comment><USER12> Several times, when working with Lua, I've made what I call "Janus tables".

Give them a string, they return a table or function. Give them the table or function, they return a string.

It's a useful technique that you can only apply if your hashmap can map anything to anything.

<comment><USER13> [https://en.wikipedia.org/wiki/Bidirectional_map](https://en.wikipedia.org/wiki/Bidirectional_map)

Any hashmap will have problems with storing mutable objects, where the hash value itself can change _after_ the object has been stored, causing some very unwanted paradoxes.

And _that_ is the problem with Python dicts as keys.

<comment><USER14> I don't think mutability is a concern if your goal is to get a bidi map between strings and (mutable) _instances_; i.e. if you just want to use the reference to the dict itself as the hash rather than the contents of the dict itself.

<comment><USER13> Yeah, I don't actually know if Python computes hashes for dicts by content or "identity".

I just assumed it was the former, based on the fact that dicts are disallowed as keys.

<comment><USER15> It's been a while, but I'm pretty sure the reason why a dictionary can't have a dictionary as it's key is because the dictionary class doesn't implement the __hash__ method that would compute the hashcode.

<comment><USER11> This is definitely the proximate reason.

The reason for that choice is because the object is mutable.

<comment><USER15> Sure, but as others have mentioned, you can make your own choice by subclassing dict and defining your own hash function, as long as that function is defined in a way that follows the appropriate rules.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> Python's documentation is not the worst, but it's certainly nowhere near the best.

As for JavaScript, these days I almost entirely rely on the MDN documentation and hardly go to Stack Overflow for that topic.

<comment><USER17> Came here to write this. MDN is a blessing.

</comment></comment><comment><USER18> I think a big part of it is how much canonical documentation and resources has improved in JavaScript vs. how much people are struggling with it in Python (as someone who does more Python than JS but does both).

Python libraries tend to have less documentation and their documentation tends to be less live whereas JavaScript has been more stable lately (something I didn't think I'd ever write).

Funnily enough the last time I really struggled with a JavaScript library's docs it was Tensorflow.js (a Python port).

Also, I'd love to see a comparison that checks "all" JavaScripts (+TypeScript).

<comment><USER18> Another thing I've noticed is that the Python community in StackOverflow is very nice and considerate most of the time compared to the JavaScript crowd. (Being a part of both).

If anyone is interested in engaging by the way: [https://sopython.com/](https://sopython.com/)

<comment><USER19> This seems true of the Python community in general. I've yet to meet anyone that's not nice and really supportive (there are bound to be some, but I've not knowingly interacted with them).

I think it's a great measure of a programming language's ecosystem when taking part in the community is such a pleasure.

<comment><USER20> From the beginning the language has taken great pains to be readable and comprehensible. It makes sense that would breed a community that values empathy.

<comment><USER18> That's a good point! Though I think a big part of it is that the web stack changes a lot more often which breeds a lot of fear that kills empathy.

I've met some of the nicest people I know in the JavaScript open source community and some of the most empathic though.

</comment></comment></comment></comment></comment><comment><USER21> I like Python and it's my main language currently after years of C++ and Java. My main problem with Python is that it's really easy to create really messy code that no one can follow. And I see it often because everyone is using Python these days. For example, you have an undocumented function with 6 arguments and have no idea what these are (having bad names also doesn't help, but that's not a Python specific issue).

Type hints and annotations are a step in the right direction. But the adoption is still not high. That's the blessing and curse of Python - it supports many good practices but it doesn't force you to use them so it really depends on the programmer.

<comment><USER13> I have my problems with Python, but I'm not aware of _any_ language where it's not "really easy to create really messy code that no one can follow".

<comment><USER21> True but take my function example. In Java for example you will have the types to click on to figure out quickly what the arguments are. Another example? In Python it's "easier" to make spaghetti code because of the scoping of variables that are less strict. I can give many more examples like this.

</comment></comment></comment><comment><USER22> It just means that almost all trivial questions about JS have been asked and answered, now it's Python's time.

\---

Also I bet that if each language's words were compared to the overall vocabulary for SO, or at least to the cumulative one for these languages, the differences would stand out more.

And of course, the usefulness of a word cloud visualization is highly dubious to me.

<comment><USER9> No if you see the questions, they are the same over and over, for js or python. Simple things you can google, answered a 100 times.

</comment></comment><comment><USER23> I've used python for a while but mainly for small scripts. I'm often googling answers. (Is it myvar.len() or len(myvar) or myvar.__len__.?) do I use conda or pip or... 2.7 or 3.?. Oddly I'll use books for other languages (Perl/JavaScript).

It's a fine language and easy to get running but it seems harder to memorize things in it vs others (if I was 100% of my time using it, it probably would easier).

<comment><USER24> > ...it seems harder to memorize things in it vs others

This x10. I love Python, and use it for small scripts when I get the chance (just used it to test some probabilities last night even), but it seems like I constantly have to look things up all the time in it and can't seem to remember even common, basic syntax in it, despite having used it quite a bit. I really don't know why. I can leave and come back to other languages and not have anywhere near as much difficulty.

<comment><USER25> Interesting - I had the complete opposite experience: Python was the first language I'd tried in a long time that just worked as I'd expected it to. After understanding the initial indenting rules, most of the code I tried could be written as pseudocode, which surprisingly worked the first time.

I was really impressed, most languages have so many stupid syntax requirements, which really shouldn't be be needed these days - <USER2> compiles to the same assembler code so lets not pretend these languages are doing magical things.

The goal should be for programmers to get the logic across to the computer in the simplest form - and Python is pretty good for that (apart from zfil - seriously, can you get any more unintuitive)

<comment><USER26> > everything compiles to the same assembler code so lets not pretend these > languages are doing magical things.

Nope. Some languages get compiled into binaries that are more performant with a smaller footprint. Some have a runtime that provides features like garbage collection and runtime evaluation. Others let you define macros that run at compile time, extending the syntax of the language. Some are graphical live environments. Others offer full high-level concurrency.

Languages have different syntaxes to support the features that their interpreters or compilers can convert into the code that can run on the target environment. This is not going to be the same across all languages, and there are tradeoffs.

</comment></comment></comment></comment><comment><USER27> Is it happening because of Python getting more popular or getting more complicated to use?

<comment><USER9> 15 years of Python here, started in 2.4. Day to day Python is not more complicated to use. It's actually easier due to many bugs fixes, quality of life features and better error messages.

However, Python does provide more tools to do more complicated things (async, type hints, etc), but that's not what most people use. They actually don't even know about it, and don't have to care. So it's not the questions you see on SO.

Python has gotten much, MUCH more popular, and we are currently facing a wave of new beginners. Particularly from schools (it's now the default teaching language in most countries) and from loads of workers that can benefit from manipulating data with programming and are attracted to Python for this.

It is precisely because Python is still easy that it's that popular: it doesn't benefit from massive existing code bases like Java or accidental monopoly like JS. We just have a lot of people creating a lot of libs for pretty much everything, because everybody can do it.

I also think the aesthetic of the language plays a big role. Python has been designed to allow you to dev with it with just MS notepad if you have to. It means you don't need to learn about a gigantic and complicated ecosystem to be productive with it (although it does exist): it's a huge help for all those people that are just getting started or not a programmer at heart. It's also harder to create very ugly code because you don't know what you are doing, and if you do, the result will not be as bad as with other languages because Guido made sure of it.

It's also why you don't get multi-line lambdas. Everything is a compromise.

<comment><USER28> I mostly agree with you, but still think that Python could be way simpler and equally powerful. I'd love to see a language similar to Python, but with named structs instead of classes, for instance.

<comment><USER29> @dataclasses?

<comment><USER9> People have not caught up with 3.5+ yet. I see plenty of code not using f-strings, chainmaps, pools and the likes.

We can't expect them to known about dataclasses yet.

</comment></comment></comment></comment></comment><comment><USER30> In this sort of context, "most questioned" is probably not much more than a synonym for "most popular".

<comment><USER31> Couldn't disagree with you more.

"most questioned" is some combination of:

\- many beginners

\- incomplete or outdated documentation

\- not taught (or taught well) in schools

\- SO users who don't search for old answers before posting again

See how none of those things, even mixed together, are a good proxy for popularity?

We don't know the mix of the above factors for Python, but without better analysis, the headline here is meaningless outside of its specific claim.

<comment><USER32> > See how none of those things, even mixed together, are a good proxy for > popularity?

I'd say that having many beginners alone is enough to qualify as "popularity". There are more people learning programming that programmers.

<comment><USER31> I can't disagree with you because that's an issue of semantics. I would define "popularity" as the number of people using the language, regardless of skill level.

By that definition, I'd guess that Python is near the top due to its recent dominance in data science, but Stack Overflow isn't proving or disproving the idea either way.

Using my definition (and likely yours), JavaScript is certainly the most popular. But it's hard to discount the many huge organizations using Java and C#. Their beginners might not be using Stack Overflow as heavily because they have in-house mentorship.

</comment></comment></comment></comment><comment><USER33> Seem to me that Python has won. What I mean by that is that it is used almost everywhere and there is almost no compelling reason to use anything else. You want web? Django, plus a million other frameworks, all well tested and documented. Machine learning? Tensorflow, Keras or PyTorch. Scientific computing? Numpy.

For the last two decades people have complained about (C)Python not being multi-threaded, not jitted, not having tco, being to simplistic and so on. In practice it seem to have mattered very little. For the applications where it do matter, like if you are writing your own language vm, compiler (but see PyPy) or garbage collector, you have to ask "Yes, ok, but how often do you do that?"

<comment><USER34> There are plenty of compelling reasons to use other languages. Macros, types, threads, interfaces, lambdas, tail calls etc.

But what matters in this world is short term profit. Python is easy to get started with, has a ton of frameworks than can be duct taped into semi-working software by mostly anyone and is taught in many schools.

<comment><USER35> The majority of the people in the world that can benefit from writing computer programs for the most various purposes are not professionals, nor desire to be.

Computation is a powerful tool wide incredibly wide applications, and Python makes this tool accessible to humanity in general. That is no small thing.

Macros, types, threads, interfaces, lambdas, tail calls, etc. are incredibly niche interests, and perfectly unnecessary for the vast majority of computations that people would like to perform.

<comment><USER34> Sure thing.

Until the last paragraph.

There comes a point in every amateur programmer's evolution when learning which way is up and picking more powerful tools is the right thing to do.

</comment></comment></comment></comment><comment><USER36> This may reflect the recent addition of features to Python that were not really needed.

Another problem is "virtualenv". With more "version pinning" capability, there's an increasing tendency for Python programs to require their own special snowflake environment. I keep seeing install instructions which begin "Install virtualenv".

Package authors then worry less about backwards compatibility. That's the sort of thing that generates Stack Overflow questions of the form "Why isn't X working with Y".

</comment><comment><USER37> My first thought on reading this was the guess that, while the questions about Javascript are about fewer topics, the questions about Python are more widespread (because it gets used for more different kinds of things). In other words, if you looked at the volume of questions _read_, you might still see a substantial lead for JS, but it's even more likely that your question has already been asked (and answered) on SO, thus fewer new questions than for python.

Just a guess, of course.

</comment><comment><USER38> I wonder if this is a combination of JavaScript frameworks becoming more sophisticated and offloading concerns from developers and the sheer exhaustion of trying to get a question answered from SO without the host of problems involved in simply asking the question.

It's often easier to ask and answer your own question on the corresponding Github issue tracker and let Google index it, then to run the SO moderation gauntlet.

</comment><comment><USER39> I find the term 'questioned' almost hilarious

</comment><comment><USER40> A lot of universities are now using Python at the beginning of their curriculum, that may be one of the cause.

</comment><comment><USER41> The biggest Universities in Norway switched some years ago from Java to Python as intro language. Think the Universities are a large driving force in the long run.

</comment><comment><USER42> I think it's partly because a lot of academia use it and most of those people are without formal CS degree which is completely fine.

</comment><comment><USER43> That indicates how fast data science and ML are growing

</comment><comment><USER44> And yet there isn't a proper Python to JavaScript transpiler, like ClojureScript is to Clojure. I wonder why.

<comment><USER45> Yes, that always puzzled me. Same with Jython which has a much smaller following than JRuby. I think with Clojurescript it's a case of really adding value whereas Python to JS is largely syntactic sugar.

<comment><USER44> That actually makes sense (the difference between CLJS and syntactic sugar transpilers).

</comment></comment></comment><comment><USER46> Do questions about JavaScript libraries like React/Vue get included as "JavaScript" questions?

</comment><comment><USER47> Is typescript counted into the js category of questions?

</comment><comment><USER48> Of course, each noobie is confused about who to properly do things :)

</comment><comment><USER49> As in: "Why on earth did you implement this in Python?" ;)

</comment><comment><USER50> I'll take a stab at it.

Ask a question for (server) Javascript- 99% of people aren't going to try because the code is too unruly to deal with. Its simply faster to google and debug.

Ask a question in python- python code is simple enough to copy paste into SO. And given python has hordes of newbies, they don't realize google is probably a better place to look.

This synergy of situation is why Javascript is getting less questions.

EDIT: I program in both, I don't see why this is invalid.</comment>


Runbook: A Ruby DSL for Gradual System Automation - <AUTHOR> https://medium.com/braintree-product-technology/https-medium-com-braintree-product-technology-runbook-be6f072cfc0d <comment><USER2> Looks pretty well thought out and useful and the documentation is great. can you elaborate on what you use it for at braintree?

<comment><AUTHOR> We use it to automate or semi-automate a broad range of tasks that can't be accomplished within the context of a single app or system.

For example, we have a pretty extensive pre-flight deployment checklist for our applications that are in PCI scope in order to ensure we meet compliance requirements and reduce human error to provide a high degree of reliability to our customers. This checklist includes a number of sanity checks to ensure we are deploying the correct code, that it has been thoroughly tested, that it has received the necessary sign-offs, that contingency plans are in place, and that we have appropriate monitoring in place.

Some of these steps are automated such as launching monitoring dashboards and some steps cannot be automated and must be done by a human such as verifying that appropriate contingency plans are in place. Our runbook walks our developers through this process step-by-step and documents that all steps were followed for future audits. Further it provides a low barrier to entry so developers that are new to the team can execute deployments of our mission- critical applications without extensive training. When our process changes, for example when migrating our applications to kubernetes or introducing new monitoring, we can make these changes without requiring developers to learn a new process.

Another example where we've found runbooks invaluable is doing OS upgrades for services in our datacenters. These operations have resisted full automation due to slight variations in system configurations, however scripting them with runbooks allows us to troubleshoot issues, build fixes into our runbooks, and resume execution where we left off.

<comment><USER2> That's quite cool! Thanks for sharing</comment></comment></comment>


Is this how hackers have ravaged my country? - <AUTHOR> http://www.kenyanebay.realtorinvestments.co.ke/cybersecurity-ethical-hacking/ <comment><USER2> Watch out for the pop ups on this website!

<comment><AUTHOR> pop ups??</comment></comment>


Tutte-Coxeter Graph - <AUTHOR> http://blogs.ams.org/visualinsight/2015/08/15/tutte-coxeter-graph/

<comment><USER2> This is a fascinating article, but I'm still left with the question : why? What good is this theory - how can it be applied somehow in the real-world, do improve someones life?

Don't get me wrong, I think its important to develop these theories. I just don't understand how it can be used in the real world. Anyone know examples?

<comment><USER3> Automorphisms of strange structures like this are connected with the constellation diagrams that got us from 4.8 K bits/sec up to 57.6 K bits/sec and beyond on modems. They're also used in designing block codes and error correction codes.

The interactions between graph theory and group theory are deep and productive, but not immediately obvious, and occasionally convoluted. There are others here who can talk more knowledgeably about the details - not my area.

It's also the case that pursuing these sorts of things purely for the sake of solving the puzzle can turn out to be of value, even if there are no immediate and obvious applications. Graph Theory and Combinatorics were just curiosities originally, but have turned out to be critical in many, many areas, not least coding theory, processor design, algorithm analysis, and much, much more.

I wrote about this some time ago, and have submitted a link so people can comment and/or write more. It's here:

[https://news.ycombinator.com/item?id=10066365](https://news.ycombinator.com/item?id=10066365)

It will probably sink without trace, but thought you might be interested.</comment></comment>


Improve your walking technique - <AUTHOR> https://www.suunto.com/en-us/sports/News-Articles-container-page/how-to-improve-your-walking-technique/ <comment><USER3> Two years ago I bought my first pair of barefoot shoes (no elevated heel, thin and ultra flexibel sole) after listening to an episode of TED Radio Hour, where they featured the talk "Born To Run" and started reading more about the whole idea. I started to learn how to walk forefoot strike and did a running course for how to run forefoot strike properly. This was the start of going down a never ending rabbit hole. Some of the things I learned during the past two years:

* Learning a new walking technique is super hard, it takes at least months, if not even years.

* Wearing barefoot shoes and walking forefoot strike seemed to significantly decrease my lower back pain (although I'm not a 100% certain if there is a correlation, I just know that my back pain decreased a few months after switching to barefoot shoes)

* Got rid of my neck pain completely (I'm extremely certain that there is a correlation here, because my posture changed, more on that in a later point)

* I realized that my leg muscles (especially hamstrings and calves) are extremely tight and possibly also shortened. In the beginning I had trouble to get my heel to the ground without feeling tension in the calves.

* Just because I adapted my style of walking, my posture increased significantly. I walk and stand way more upright than before (I compared recent pictures to older pictures)

* Significantly decreases the number of migraine attacks. I'm also quite sure this is because of the forefoot strike (although not 100% certain) since heel strike puts a lot of pressure in the neck and head. You can easily Test or experience this Stress on the neck and head yourself if you stick your fingers in your ears and walk barefoot with heel strike over firm ground. You should "hear" it. For me it works best when I put in noise cancelling over ear headphones and walk heel strike (no music, just the noise canceling effect).

Of course all of this is highly subjective and many/all things I described may not correlate at all. This is just my personal experience.

<comment><USER4> What would your advice be to anyone interested in getting into barefoot walking?

<comment><USER5> Take your shoes off. (sorry, I had to)

Go walk outside without them on something mildly unpleasant, like "chipseal" pavement or gravel for short distances - the increased feedback will encourage you to walk gently (advice stolen from Barefoot Ken Bob's book, which is rather nice).

Take it slow. Don't feel like you have to go 100% minimal-shoe all the time. Take your shoes off at home. Maybe get a pair of thin sandals - I personally like Xero Shoes (they also sell a kit if you're into that, and they're one of the only pairs of sandal I've had that actually last for multiple years). Moccasins are also lovely, if you can find some with a thick sole (or buy some buffalo hide and DIY!).

Minimal shoes don't last any longer and generally aren't any cheaper than regular shoes in my experience - getting comfortable with your feet on the ground when possible is the cheapest long-term option.

</comment></comment></comment><comment><USER6> The Chinese idiom 邯郸学步 is about learning to walk. It's based on a story about someone who hears of a place (Handan) where people have the most gracious way of walking. He wants to learn, so he goes there and tries to imitate the people of Handan. He fails to learn how they walk and, in the process, forgets his original way of walking. Then he runs out of money to fund his travels. Unable to walk, he is forced to crawl all the way back to his home town.

<comment><USER7> I can't help to think how this story might reflect many of us who immigrated to the US for the "gracious way", forgot the way we used to "walk" and now find it difficult to return back home. It is saddening.

<comment><USER8> Same for my mother. She can't bear her old place now.

<comment><USER9> It's hard to get back to Plato's cave.

</comment></comment></comment></comment><comment><USER10> > It's worth the effort because there's usually a huge leak of energy when our > gait is unbalanced or restricted.

Why do I want my walk to leak less energy / be more efficient? A fast walk is nowhere near my aerobic limit, so what would be the benefit of using less energy? Having a sedentary job, I generally need more exercise, not less.

A better thing to optimize for would be less impact on knees and back.

<comment><USER11> Your argument doesn't really makes sense. I spent a lot of time fixing my run and posture and indirectly how I walk due to injuries.

You 100% want to be moving correctly. Correct, efficient movement also helps with injuries. They're related.

Once you are moving correctly, getting more exercise injury free is trivial. You just work longer, heavier or faster. You don't need to move inefficiently (and probably incorrectly) to "get more exercise".

<comment><USER12> What did you do to fix your running posture? Any recommendations? (Trying to work on this myself)

<comment><USER13> Not OP, but I am a nationally qualified running coach (in my spare time outside of my day job). I have run all sorts of distances from 5k park runs to 100 mile and above ultra marathons. I have made every mistake in the book and helped quite a few people avoid the same mistakes.

To keep things simple with two easy to follow steps:

1\. Tall posture, imagine a balloon is tied to the top of your head and is pulling you upwards.

2\. Download a metronome app to your phone and set it around 170 and in time climb up to 175 180 if it feels ok. You then want to time each foot strike to a beep. This will cause your stride to narrow and discourage an overstride. When you overstride the foot extends forwards and the force of landing gets absorbed by your knee / hips, which is inefficient (its almost like applying a break) and it can cause injury. Running at a high cadence tends to make you ligter on your feet and encourages a good foot strike (under the cartridge of the hips), landing in this way benefits from the elasticity we have in our tendons and you get a certain amount of energy return from this.

This video describes it very well and the runner has beautiful form. Just don't try to take it all in, focus on the cadence 170-175-180 rhythm and get that right first

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

<comment><USER14> Be careful when changing running style. If you change too fast you increase the risk of injury. Happened to me. Had knee problems. Switched to barefoot running with short fast step and very light to no heel impact. Felt great! But I pushed too fast, got a foot injury which is still bothering me and limiting my long distance running.

For me a fast very short step on varied ground worked best to slow down.

[https://4.bp.blogspot.com/-0gXKdNPW-2U/V4EW8HkpSfI/AAAAAAAAi...](https://4.bp.blogspot.com/-0gXKdNPW-2U/V4EW8HkpSfI/AAAAAAAAiM0/zE1A080-eJULh4LvwefB3E4w3xUSkfTQgCLcB/s1600/IMG_2103.JPG)

</comment></comment></comment></comment></comment><comment><USER15> I grew up on a skateboard, went on to martial arts; did a lot of rock climbing, running, hiking, yoga, etc.

Then I managed to smash a vertibra in a climbing accident which meant spending the next two months learning how to do all of those things, including walking without putting strain on my spine.

There's a good book with the name Born To Run, one of the basic ideas presented is that the human body is a perfect running machine. You don't need to add anything, just stay out of its way and let it do what it was built for.

Here's what I would encourage anyone interested to try:

Start by balancing the spine sitting on the edge of a chair. Roll shoulders backward, relax the stomach, tilt the hip forward and pull the chin in until you feel your upper body is balancing on the root of the spine in your hip. Do a body scan and release any sign of muscle tension, the idea is to use bone structure and tendons to carry the weight. It should feel effortless, like the upper body is floating mid air.

Then repeat the same procedure standing up.

Now comes the slightly tricky part, unlearning the funny walk you've most likely been practicing your entire life. I recommend starting barefoot.

Keeping the same pose, and making sure not to tense any muscles, including the muscles in the feet; lean slightly forward. If you manage to do it without tensing, your body will start walking by itself and the feet will land exactly where/how they're supposed to. Leaning further increases the speed.

Adding muscles will increase the speed further. Just make sure the energy is directed backwards, pushing the body forward; and not straight down into the ground which is what people usually do when running, especially with bouncy shoes.

</comment><comment><USER16> For all citywalkers: check how the sidewalk slopes to move rainwater to the street.

I was always walking on the right side of the city roads. This resulted in pain in my right leg because most weight was put on that side.

The solution was simple: also walk on the left side of the road. I never thought of this before.

<comment><USER17> Apparently this is a known problem that can affect people who run/jog on the same side of the street all the time.

</comment></comment><comment><USER18> >Roll the feet: First place the centre of the heel, then roll the outside edge of the foot down before placing the outer toes, and rolling down the inner toes.

Do we know if this is better? I mostly wear barefoot/minimalist shoes and have switched to mid/forefoot strike, from a heel strike.

<comment><USER19> You mid-foot strike while walking? When I wore barefoot shoes, I could mid- foot strike while running but doing so while walking always felt extremely unnatural and I couldn't adopt it.

<comment><USER20> As a kid I was obsessed with cowboys and indians. Indians were the good guys in my book so I learned to walk like them to reduce noise - mid-foot first.

20 years later and the shriek my girlfriend lets out when she turns around and I'm _right there_ materializing behind her back like a ghost.

It's amazing. Took about a week of conscious practice in middle school and now that's just how I walk. Heel first when barefoot or in slippers makes my feet hurt.

<comment><USER21> yea I don't know if I adopted this because my hamstrings are stunted or if my hamstrings are stunted because I adopted this but its just been how I walk since I was a teenager.

and like your anecdote, I've had to be mindful of things like neighbors or coworkers in a hallway, going out of my way to scuff my feet or something while I'm still 10+ft out. people really don't like it when you register as instantaneously in their personal space.

</comment></comment></comment></comment><comment><USER22> If you want to learn more about how to walk and move better I can't more highly recommend the content by biomechanist Katy Bowman [https://www.nutritiousmovement.com/blog/](https://www.nutritiousmovement.com/blog/) ... She has a blog, a podcast, online classes, books, and a whole gamut of content around restoring basic movement - and talks a ton about walking. So important for all us desk jockeys.

</comment><comment><USER23> I would be very careful of any claims made by barefoot shoe manufacturers regarding it being more natural/it's how we evolved, especially if running on roads or other hard surfaces. While I agree they can be beneficial in small doses and/or on natural surfaces, I'm not sure the human foot evolved to run on concrete surfaces.

<comment><USER24> Suunto makes sports watches, heart rate monitors and dive computers, not barefoot shoes :)

</comment></comment><comment><USER25> Many years ago at an Apple WWDC event I saw a presenter give a talk about how they used genetic algorithms to find out what the most optimal walk for a dinosaur could be based on its bones and skeletal structure.

I wonder if such an optimal gait could also be discovered for humans, perhaps for different heights, and when carrying different loads. Maybe the best way of walking for a person who is very tall is different from someone who is very short for instance. By constructing random human bodies and allowing them to evolve over millions of iterations, we may be able to discover unrealized walking techniques.

</comment><comment><USER26> I'm in the camp that whatever bodily motions you learn as a young child, your body adapts enough to it that you won't get any kind of damage. I mean, we even had articles here about children having extra bones on the back of the head to counter constant smartphone gaze.

It is the weakening of the muscles that creates issues later in life, mostly due to lack of movement, gaining too much weight and similar.

My whole spine is straightened (from neck down, I have lost the natural lordosis of spine) because I've been sitting and looking at computer screens ever since I was a child. My spine is fine, I do not have any pain, but did start feeling pain in the upper back when I did not exercise for 3 years. Once I started exercising pain went away (still slouched and sat a lot).

Also, there's absolutely no way I could return back to natural lordosis of spine, my spine was straightened since I was 11 years old, my spine shape is the result of adaptation to prolonged sitting.

</comment><comment><USER27> Walking "properly" is a topic of interest for me. I believe it can be reduced to one main constraint: ensure most effort is spent by abdominal muscle in your core, with limbs and the (importantly) neck as relaxed as possible. Other characteristics of "proper" walk naturally emerge as the easiest way of following that constraint[0].

I find that walking "properly" wakes me up, has some positive effects on my well-being, and can be difficult at times. Unevenly paved surfaces (like some cobblestone pavements) seem to complicate walking "lazily", forcing me into the proper way of walking.

[0] IMO articles like TFA tend to focus on those "cosmetic" characteristics, thus entirely missing the point.

<comment><USER22> You should be walking with your hips primarily. Your core is important though.

<comment><USER27> That way it's still possible to fall into other lazy habits, such as walking with stiff neck and shoulders.

On the other hand, if one aims to relax all limbs (that includes feet) and localize energy expenditures in the abs area as much as possible, "walking with hips" might well be the only remaining acceptable way to walk.

</comment></comment></comment><comment><USER28> The movement in the videos are demonstrated by a woman and one of them focuses on the pelvis. Are there significant differences between how a woman's body and a man's body walk ?

</comment><comment><USER29> Next week: teaching your grandmother to suck eggs!

</comment><comment><USER30> Any tips for people like me who have flat feet?

<comment><USER31> Stop believing that you have a severe deformity and just walk. It's part of the scope of human phenotypes and harmless.

<comment><USER32> Yep. Stop watching all sorts of advice from your chair. I have been hiking for many years now at ca. 2000 km per year. The body simply optimizes itself in time for all but very few people. A little adjustment might be necessary for particular cases, but you will figure this out finally yourself.

But the highest priority by far remains doing the basic things. Regularly - <USER2> any weather in this case - without excuses. That is the core. All other issues are premature optimizations (or to be clear, no optimization at all)

</comment></comment></comment><comment><USER33> You can't improve your walking technique unless you improve your life. Your posture, your gait, your movements are a complete reflection of how you feel.

If you feel like you're carrying a load on your shoulders... your shoulders are gonna show that. If you feel like you have to clench and grind through your days, your jaw is going to show that. etc. etc.

A really interesting question to reflect on is when someone gains weight, what determines where the weight goes? Their stomach? Their thighs? Everywhere evenly distributed? etc.

<comment><USER34> I agree, for the most part. However there is definitely something to be said for reversing the cycle. That is, when you feel down or frightened, purposely sit/stand/walk as though you are fully in control and on top of things. You'll find with some practice, your mood will improve. I think I heard it first from Tony Robbins years ago, but I'm sure it's well known technique.

<comment><USER33> After a lot of reflection I think I'm in a place now where I disagree with this cause just taking over the body with mind control can lead to schisms and narcissism and denial of self

I do agree bringing awareness is verrryyy helpful and healthy. the key is to keep being aware of what comes up for you and accept it and embrace it and get to know it and empathize with other postures/bodies to see how exactly your body _could_ feel differently and as you realize more and more what your body is really feeling, it'll naturally heal on its own. no need to step it and change things consciously, which never really does anything anyways cause your subconscious takes over as soon as your attention shifts away

the key thing to take away here is it's impossible to fully realize how your body actually feels without some psychological insights into yourself as well, to move some stuff from your subconscious to your conscious

like for example one can't fully realize how much anger their jaw is holding unless they also realize how much they feel angry about their life cause of something they haven't realized and have repressed

for anyone interested in reading more check out alexander lowen's books on amazon. fascinating, fascinating guy with lots of veryyyyy interesting things to say. any of his books will suffice really, i've read most of them

</comment></comment></comment><comment><USER35> This kind of reminds me of Feldenkrais or the Alexander technique.

</comment><comment><USER36> During my time as conscript in the Swedish army, I got a lot of experience from marching around with fellow soldiers. Eventually I could recognise each one of them (about 25) just on how they moved their legs. I could even close my eyes and go through them on by one in my mind and recall their gait.

<comment><AUTHOR> I've had a friend say he could tell it was me approaching, based on my gait (I hadn't seen him in several years and his eyesight was such that he couldn't see my facial features from that far away, but apparently my gait was still the same and he could identify that). There's been work to apply gait analysis in an automated fashion for use as a biometric identifier:

[https://ieeexplore.ieee.org/document/1301521](https://ieeexplore.ieee.org/document/1301521)

[https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1556-4029....](https://onlinelibrary.wiley.com/doi/abs/10.1111/j.1556-4029.2011.01793.x)

</comment></comment><comment><USER37> Just as important is your breathing, focusing on nose instead of mouth breathing, and tongue posture

</comment><comment><USER38> For some fun re-learning how to walk, take a latin dance class.

[https://www.youtube.com/watch?v=F7JF4ZZvZ3Y&t=125s](https://www.youtube.com/watch?v=F7JF4ZZvZ3Y&t=125s)

</comment><comment><USER39> They claim the second one where she is just shimmying is "freeing the pelvis", but all of the motion is in her upper thoracic spine.

</comment><comment><USER40> Amazing that there are 32 comments and somehow this article avoided tripping the HN This-Is-Just-A-Marketing-Blog-Post silent alarm.

<comment><USER41> It's quite odd indeed - there's no links to actual research to back up the claims, her statements aren't clarified (saying tilting the head down adds weight - at least specify that it's adding weight to the neck or something.) It's just a piece about what this lady says based off some other odd looking website.

<comment><USER40> My theory is that the nutrition and exercise posts get a pass because everybody races to share their similarly unfounded opinion instead of even looking at the post.

See the comments for every IF, keto, running is good, running is bad, weightlifting, etc. post on here.

</comment></comment></comment><comment><USER42> I guess you have to be pretty far down the path of self actualization to worry about things like this

<comment><USER43> I had the opposite reaction. Walking costs no money, is something most of us do everyday, and small changes can dramatically affect quality of life over time. I'd compare it to sleeping or brushing your teeth.

<comment><USER42> > small changes can dramatically affect quality of life

I'm quite skeptical that small changes in my walking will dramatically change the quality of my life. I think it would actual be annoying to think about and I'd rather be thinking about things that interest me while I pace around

<comment><USER43> The point is to consciously undo bad habits and build new, healthier ones, so that you don't need to think about it.

</comment></comment></comment></comment><comment><USER44> "The head adds six to eight kilograms of weight, but by tilting the head forward it increases to something like twenty kilograms"

Astonishing. My head's mass (or is it weight?) can be increased simply by moving it slightly it? Someone alert the physicists!

<comment><USER45> Well, honestly weight is not mass.

If you treat the neck as a pivot point it can require more or less force to maintain position of the head.

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

<comment><USER41> Right, it adds a moment, which is force times a distance. Which doesn't need to be explained to the average reader, but at least the article should say it puts more weight on the neck, or something like that.

<comment><USER46> While you are technically correct, I can't imagine you challenging anyone about their weight (in kgs/lbs) when they step on a scale because the scale might not be calibrated to the "force of gravity" (which is itself not a force) at the spot of measurement.

So since it, as you nicely put it, does not need to be explained to the average reader, the complaint sounds like needless nitpicking.

Even "more weight in the neck" is imperfect — weight usually means mass, so "load", implying force, is better.

Thus I think it's acceptable to use the original wording to avoid all the technicalities that require a few parapgraphs to explain :)</comment></comment></comment></comment>


Test-time data augmentation (TTA) tutorial for production - pascal-dufour https://stepup.ai/test_time_data_augmentation/ <comment> pascal-dufour How to properly use data augment to improve a model's performance during inference in a production environment. With Colab notebook for experimentation.</comment>


Pride, Prejudice - <AUTHOR> https://github.com/NaNoGenMo/2017/issues/130 <comment><USER2> I applaud trying out cool techniques to transform text, but I think this would work better for non-fiction books.

Fiction is like a serialization of senses for your inner director that paints a world in your mind. By lopping off words, you are altering the pacing and tone of the book. Now, maybe your intent is to create a book that has a totally different character than the original, and if it is, then that's fine. But if your intent is to maintain the character of the book, doing a few replacements can do a lot of harm.

Also, most people want to read longer fiction work and be immersed for a while. This is the reason it's generally harder to sell novellas.

PS. Using the 't' contraction instead of 'the' makes this really hard to parse.

<comment><USER3> > PS. Using the 't' contraction instead of 'the' makes this really hard to > parse.

Only in some cases.

"...by a young man of large fortune from t'north of England;"[1]

This is just about the perfect edit.

[1] [https://github.com/hugovk/NaNoGenMo-2017/blob/master/03-redu...](https://github.com/hugovk/NaNoGenMo-2017/blob/master/03-reducifier/output.txt#L35)

<comment><USER4> I have never seen "the" abbreviated (or contracted?) into "t'" before. Is this common in some dialects of English?

<comment><USER5> Yes it is. It is common in Yorkshire and Derbyshire at the least - so roughly the north Midlands and up in England. Probably several other regions use it as well. The North of England is often referred to as t'North by pretty much everyone.

It is sometimes pronounced a bit like "tut" with the second t silent. The following word is often affected as well. Actually its bloody hard to try and describe. Your best bet is to find something on Youtube spoken with a Yorkshire accent. Good luck trying to understand it!

</comment></comment></comment></comment><comment><USER6> Interestingly, American and British English disagree about the contraction of possessive "have". In American English, "have" and "had" can be contracted when they are used as an auxiliary (to have done something) but not when used as an possessive (to have something).

I've seen that before.

I'd seen that before.

But not:

∗I've three bicycles.

∗He'd problems with spelling in elementary school.

However, British English does allow this contraction!

The text creates a contraction of "have had" to "have'd", where the first is an auxiliary and the second is a possessive (following an adverb rather than the subject, so that the auxiliary _can 't_ contract), which I think is proscribed in both varieties of English:

?I certainly have'd my share of beauty

But I'm not positive about the British assessment of this.

<comment><USER5> Yes all of those are "allowed" in en_GB. However, the second example you give would almost certainly be rendered as "He'd had problems ...". Yes, really!

Thinking about it, it depends, for your first example:

"Who on earth has three bicycles?" Tom asked, incredulously. "Well, I've got three", replied Jim.

"I've three bicycles up for sale today" or "There're three bikes ..." or "There are three bikes". Some people find there're (there are) a bit dodgy.

I don't think that en_GB or any other version really gets too hung up on things like that anymore. That said, some constructions do seem more natural than others.

I have never heard or seen anyone try to use "have'd" in any modern form of English. You can get "I've had" from "I have had" or "I'd 've had" from "I would have had" or if you really want to drop the aitches then I'd 've 'ad. The last two are quite common in speech but not written.

<comment><USER7> What about "He'd'd problems with spelling..."? Theoretically it seems fine.

</comment></comment></comment><comment><USER8> This is obviously a cheeky/fun project, but I'll just take a moment to be pedantic and point out that literature is entirely the wrong domain for this sort of tool. A litany of literary information is encoded in the superfluous: authorial idiosyncrasies, period styles, the intended regional locale of the characters, the anticipated reading level of the audience/familiarity with the material, meaning at the linguistic level ('meta' narrative).

While I think this tool has a great deal of potential application in domains like technical documents, texting (or other forms of communication that lend themselves to brevity) etc. I don't think literature falls into that camp.

</comment><comment><USER9> Congrats on the project! It's hilarious, probably useful somewhere, and it made my day.

Something in the opposite direction would be interesting as well. As a student, I was selective with where I invested my energy, according to my level of interest in the topic. _Like many students, I developed an obnoxious flair for elaboration where it was no longer necessarily required and, as I thought, I actually became quite good at making sentences twice their original word length and sentence length from what they were otherwise required by my instructors to be._ I would have welcomed a more automated process for the task.

</comment><comment><USER10> Not being a downer, but really, is there any usefulness to this at all?

<comment><USER11> Presumably can read the book faster because there are fewer words, while still basically retaining the same amount of information.

<comment><USER10> Id venture to say this almost completely contrary to the point of literature. Literature is not about the information contained within, its about how the information is presented.

</comment></comment></comment><comment><USER11> When will the browser plugin come out? :)

<comment><USER12> Here's what I have so far:

        var p=document.createElement('pre'); p.textContent=document.body.textContent.replace(/[ \t]+/ig, ' ').replace(/\n[\s\n]*/ig, "\n\n"); document.body.replaceWith(p);

</comment></comment><comment><USER13> Great to see a NaNoGenMo entry on HN! If you've never participated, it's a competition (with no official winners) to see who can write a program that generates a 50k word "novel" in one month. It happens each November, to parallel NaNoWriMo. See [https://nanogenmo.github.io/](https://nanogenmo.github.io/) for more details and other entries.

</comment><comment><USER14> Hmm, a comment from someone who just learned about Huffman encoding and had a project on text classification -- it seems that the majority of commonly- written or spoken English words are terrible for conveying semantics; words like "the", "a", "to" are mostly just filler words.

Is it possible then to create a vocabulary of English words dedicated towards an emphasis on meaning?

</comment><comment><USER15> For added fun and compression, choose American spelling of words like "honour" and "neighbour".

</comment><comment><USER16> Readability suffers and character reduction will be nowhere near the rate of word reduction. But fun idea.

<comment><USER17> Character reduction? Well, i suppose Pride and Prejudice could probably stand to lose two or three Bennet sisters.

<comment><USER7> It absolutely cannot, sir.

</comment></comment></comment><comment><USER18> This is obviously just for fun, but it would be interesting to see if a similar approach could be considered for, say, high-school level textbooks, which are notoriously padded with useless content.</comment>