Tool of the Day: Get Your Ideas Reviewed on Idea Roulette - <AUTHOR> http://www.usefultools.com/2011/01/get-your-ideas-reviewed/

<comment><USER2> Its an interesting idea, but unqualified advice isn't as useful as knowing the background of the person reviewing giving you feed back.

When you ask for feedback on HN you can look at the history of the person offering you advice.

Perhaps adding a background field might help.</comment>


In the US, we need a Muslim-Jewish alliance - <AUTHOR> http://www.aljazeera.com/indepth/opinion/2017/01/muslim-jewish-alliance-170123045330480.html <comment><USER2> Nope, we need people to be treated by their actions and social circumstances, and not by their gender, age, race, faith, or favorite popband.

<comment><USER3> When has that ever been the way in America?

<comment><USER4> What does that have to do with what we _need_ or _should do_?

</comment></comment></comment><comment><USER5> Instead of all these unholy alliances, why not just regard all your fellow citizens as allied?

Silly stuff like this will only divide the populace further.

Semites making unholy alliances will only fuel the fire of neo-nazis

<comment><USER6> Semites? A fair fraction of the Muslims I know are from the Balkans, West Africa, or the subcontinent. (And a certain number of the persons of Arabic descent are Christian.) Also, it is my impression that "Semitic" works pretty well as a description of a language family, not so well as a description of ethnicity.

Having said that, yes, regarding one's fellow citizens as allied would be a good thing.

(Also, how would one hallow an alliance?)</comment></comment>


Quick Python Script Explanation for Programmers - <AUTHOR> http://i.imgur.com/YQafj.png

<comment><USER2> Very nice! Have you -by any chance- find something similar for other languages?

<comment><AUTHOR> It was kind of a joke submission for people new to Python, but I'm glad someone found it useful. It's from the folks who brought us this publication: <http://inventwithpython.com/></comment></comment>


Ask HN: How do you organize and store your notes? - <AUTHOR> <comment><USER2> Org-Mode is great but not perfect. I would be willing to pay a significant amount of money for anyone that can reproduce most of the features of org-mode outside of emacs in a light-weight format.

It doesn't seem like it would be that difficult but it hasn't happened yet. People seem to start replicating org-mode, realize how many complex features there are and give fall off before completion.

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

<comment><USER3> I'm wondering if it's possible to reproduce org-mode features outside of Emacs at all. I think it relies on the Emacs ecosystem a lot, and _that_ what makes org-mode so great.

I mean, it's very consistent with the editor itself, it's intuitive to pick up and to navigate notes for anyone who's used Emacs before. Would it be comparable in other ecosystems (e.g. in a Web browser)?

</comment></comment><comment><USER4> For everyone using OneNote I'd like to make the comment that there are actually 2 versions of OneNote that Microsoft makes. There is "OneNote" and "OneNote 2016". Windows has both versions while your phone and Mac has only the lesser featured but more modern looking "OneNote".

Personally, I got a Parallels VM running on my Mac with Windows just so I could use "OneNote 2016". Many more features including deeper organization and custom tags.

In general, as long as you plan it out properly, hierarchical organization tends to be superior to tag based organization, and "OneNote 2016" (and even the other version) are really good at hierarchical organization compared to say Evernote.

<comment><USER5> Thanks for alerting us to this!

</comment></comment><comment><USER6> I use org-mode (in spacemacs), folder synchronized on some cloud, private notes GPG encrypted. For me it's more than perfect. I always find what I am looking for immediately, org-mode is useful in lots of other use cases, emacs has been around for a long time and I trust will stay for the rest of my life...

<comment><USER7> I second org-mode. Previously I was using OneNote but that is limited to Windows, and on Linux I need to be always online to use the web interface.

To add one more use case: I was thinking of creating flash cards and came across org-dribble which provides the entire functionality of creating and revising flash cards using Supermemo method.

When it comes to note-taking and organising, org-mode is an excellent choice.

<comment><USER8> I think it is org-drill.

</comment></comment></comment><comment><USER9> Notational Velocity on the Mac, even if it isn't updated it still quickly stores and organizes (good for rough or final works). I'll use TextEdit or iA Writer if I need to actually work with the note or to publish. Sadly at least once a month I still need to use Office for Mac for something.

I don't personally have a need to save or insert data, images, or other content. If I really need to I'll insert the online URL or the location on my server in the note. Which makes a basic solution the best solution for me.

I also use iA Writer on my iPhone synced with iCloud for on the go access, and writing *nothing personal/private for security, secure notes are encrypted and accessed online or I use a physical air gap between machines I need it on.

<comment><USER10> Notational Velocity is great! I made a web app (in Vue.js) that's inspired by NV ([https://notational.co](https://notational.co)). All the code is on GitHub ([https://github.com/tmm/notational](https://github.com/tmm/notational)).

</comment></comment><comment><USER11> I used to use Evernote, but it just go so slow, seems like a larger app than necessary, and had a bunch of functionality I didn't use get in my way.

I tried OneNote, but it didn't stick.

I've been using Bear (Mac platforms only) and have really liked it so far. Free to use, syncing is $1.50/mo. Evernote migration worked pretty well for me.

[http://www.bear-writer.com/](http://www.bear-writer.com/)

[http://www.bear- writer.com/faq/Import/Migrate%20from%20Evern...](http://www.bear- writer.com/faq/Import/Migrate%20from%20Evernote/)

</comment><comment><USER12> Quiver (macOS) is my go-to. It works a lot like basic Evernote functionality but stores everything in readable, text files in a JSON format. You can commit them to a git repo, read them over a network, sync them with DropBox/SyncThing/etc, and so on. It's relatively cheap too @ (iirc) $10. I have no affiliation to them; I just like the product.

There's also an iOS client being worked on as well.

[http://happenapps.com/#quiver](http://happenapps.com/#quiver)

</comment><comment><USER13> For me vimwiki [[https://github.com/vimwiki/vimwiki](https://github.com/vimwiki/vimwiki)] is good enough, here is a nice overview: [https://www.dailydrip.com/blog/vimwiki](https://www.dailydrip.com/blog/vimwiki)

<comment><USER14> [http://keep.google.com](http://keep.google.com)

</comment></comment><comment><USER15> I was using physical calendar notebooks, such as Moleskin. I also tried productivity apps like as Wunderlist or Evernote. But nothing worked for my workflow. So I made my own (Mac, iPhone, iPad) app called NotePlan ([http://noteplan.co](http://noteplan.co)).

I have created NotePlan out of the need for a productivity app, which is not just pushing around todos or collecting them in buckets. But which resembles the way many people plan in the "real world": Using calendars, notebooks and bullet points. If you love, Org-mode, Bullet Journal, GTD or TaskPaper, you will love NotePlan.

Here the most important features:

* One dedicated note for every day in your calendar

* A Calendar gives you an overview of all your notes

* General notes decoupled from the calendar

* Everything saved and synced with iCloud Drive as plain text

* Markdown support with custom flavour for marking tasks

<comment><USER16> Are you going to support dropbox syncing/android client?

<comment><USER15> Dropbox is in the plans, but it will remain macOS/iOS.

</comment></comment></comment><comment><USER17> WORK: I don't a defined organizational system since it hasn't provided value for me, but my general guideline is to store the notes nearby the context of the associated topic. This can be in project file folder, on a white board, or in a collaboration tool wiki. my formats are usually txt files, email, paper (notebook, paper), or onenote. Often times I will write a note on a scrap piece of paper just to remember a topic better.

PERSONAL - I also always switch but Evernote has worked for the last year. here is my sample setup (although I do not swear by it similar to my work structure). I don't like post-it notes near my home rig ; ). Here is a snapshot: [https://www.dropbox.com/s/tlnzut54agbycnh/notes_screenshot_f...](https://www.dropbox.com/s/tlnzut54agbycnh/notes_screenshot_forHN.png?dl=0)

</comment><comment><USER18> I use OneNote! It's probably the only Microsoft software that I use, but its amazing. You are able to create Notebooks, that contain section-groups, sections, and pages. You can draw, record, paste, etc.

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

</comment><comment><USER19> I created a web app to do this for me, including the ability to save the posts I created. I wanted something that would allow me to create even more than notes, and allow for HTML and CSS. I created [https://mypost.io](https://mypost.io).

Officially: MyPost is your post, your content. Create beautiful web pages in minutes for free. Whether you know how to code or don't know how to code at all, MyPost is for you. The combination of HTML, BBCode, and various font icons will allow you to write professional and personal posts in no time. No experience necessary!

I shared it with the world... and people have taken a liking to it and found their own uses for it too. Completely free. If you decide to experiment.. hopefully you find a purpose for it.

</comment><comment><USER20> \- Clear [https://itunes.apple.com/us/app/clear-tasks-reminders-to- do-...](https://itunes.apple.com/us/app/clear-tasks-reminders-to-do- lists/id493136154?mt=8)

\- Sublime Editor + Markdown + (private) GitHub repository

</comment><comment><USER21> I use a mixture of Zim Wiki for personal stuff, Dokuwiki (the portable wiki on a stick install) for my own work-related stuff, and Confluence wiki for work- related stuff shared with the team.

I just find that the wiki format works really well for me.

</comment><comment><USER22> A mixture of things. From the top of my head: Folders of plain text files, mindmaps, paper

Having said this, the actual challenge for me lies in deciding what notes are actually worth storing. I recently browsed through the hard drive of on old laptop and was astonished to find out how maybe 95% of the notes were completely pointless. I guess a good deal of notes are only important the moment you are writing them down (to make something clear to yourself). In other words, much could have been written directly into /dev/null.

</comment><comment><USER23> Standard Notes. Simple and encrypted. Available on every platform. Markdown and code editors, as well as custom themes.

[https://standardnotes.org](https://standardnotes.org)

<comment><USER24> I was going to ask why you use this over Apple's Notes app. It looks like you're the author, so perhaps even why you chose to build this? I like the themes and Markdown support.

</comment></comment><comment><USER25> Personal: Evernote, as a big dump of things I may need in the future. I don't use tags, but when adding a note I try to include meaningful keywords which I think the future me may use to find the note.

Work / Projects: Workflowy. Each project gets a dedicated top-level folder in my Workflowy account, and under that are the (Diary) folder for chronological records, and various non-chronological / accumulation folders for things like (Site), (Marketing), etc.

</comment><comment><USER26> Mainly text files (using Notepad2-mod as editor) for short term or quick takes, and Evernote for medium/long term notes.

</comment><comment><USER24> I keep my notes from books, talks, etc as a repo of markdown files so I can access it anywhere. I also have a second private repo for personal notes. For meeting notes, I like Dropbox Paper.

[https://github.com/tedmiston/notes](https://github.com/tedmiston/notes)

</comment><comment><USER27> Mindly software's "bubble" on smartphone and TODO, NOTE, ..., in editor if they can't be immediately digested by Trac's ticket or wiki page.

If it's valuable it would end up as git committed record in sqlite Trac database, and simply erased if not.

</comment><comment><USER28> I write my notes in restructuredtext, and have them version controlled in. GitRepo. Spacemacs support for restructuredtext is as good as vim's. I can also edit my notes from the Web editor offered in GitLab, or GitHub.

</comment><comment><USER29> I'm starting to use Gitbook and Gitbook-Editor for my personal notes. Love the Editor's UI and the fact that I can keep it in my private repository is also pretty nifty.

I'm curious to hear what's everyone's workflow

<comment><USER30> Is it open source still? I only found their legacy version of Gitbook Editor, I would like to hack on it or at least be able to make some custom extensions.

</comment></comment><comment><USER31> I've been using Todoist. Now that I'm good with the keyboard shortcuts (including the quick-add from the desktop app), I find it to be a lot more effective than Evernote or OneNote was.

</comment><comment><USER32> Org mode, in git repo. Can be exported as blog, but I mostly do not care, since I am usually at my desk.

I push the repo to a server I own on the net. If it has secrets, I gitencypt it.

</comment><comment><USER33> A journal made up of both digital logs and a physical notepad, a graph of associations between things, and a wiki for deeper details on specific topics.

</comment><comment><USER34> At work I log my activities and notes on an incredibly long text file.

For other notes I just email myself. I like email as a format. It's accessible on all platforms.

</comment><comment><USER35> For small notes I use Apple Notes app. Intentionally I don't keep too many notes in it.

Some larger ones graduate into a .txt file which go into a iCloud folder.

</comment><comment><USER36> when I just have my phone, I use an app like Google keep for temporary notes.

However, if I have a little spiral flip pad, I much prefer that.

Anything I put into the phone, I transcribe onto a bigger sketch pad. I feel like having them in the phone is less accessible in some sense. Thought to paper is just easier to for me.

</comment><comment><USER37> Google Keep:

\- simple interface

\- can access it on multiple devices

\- shareable

\- can set time/location reminder

\- can pin/set color+picture for each note

\- checklist, audio note, etc.

</comment><comment><USER38> Google Keep. It lacks formatting, but it's readily available on all platforms.

<comment><USER14> Agreed.. Google notes is currently on my watch list. I am sure they would come up with more features..

<comment><USER39> Why not use Google Docs if you want Google notes with more features? I do and it works great except for my general NSA paranoia.

It's great being able to simultaneously edit a document from the PC and on your phone.

</comment></comment></comment><comment><USER40> Dropbox's Paper

</comment><comment><USER41> Pen and paper!

\- Pilot precise V5 \- Small lined soft cover moleskins.</comment>


An amazing deep-field view of Centaurus A by an Amateur Astrophotographer - <AUTHOR> http://phys.org/news/2013-05-amazing-deep-field-view-centaurus.html

<comment><AUTHOR> Full res images here: [http://rolfolsenastrophotography.smugmug.com/Astrophotograph...](http://rolfolsenastrophotography.smugmug.com/Astrophotography/Centaurus- A-Extreme-Deep-Field/29643205_8ZwvgW#!i=2536914799&k=mNgSprP)</comment>


Books to Learn Data Structure and Algorithms in Java, Python, C, and C++ - <AUTHOR> https://dev.to/javinpaul/10-best-books-to-learn-data-structure-and-algorithms-in-java-python-c-and-c-5743 <comment><USER2> All book/course links are affiliate links (e.g. tag=javamysqlanta-20)</comment>


New social network: Weblerr.com - <AUTHOR> http://weblerr.com

<comment><USER2> I went to the site, and I had to watch the video twice before I got it.

Ok, it's a not really a social network like Facebook (that's what I immediately think when I hear social network). It's more like Reddit or Digg, but with the comments embedded in whatever page you're looking at. Am I right?

A few comments:

1\. That video isn't really helping your cause. The fact that it's the only source of information about Weblerr combined with the fact that I had to watch it twice to have any idea what it was is a problem. The video goes for 1:17, and there's literally only 5 seconds of it that tells me anything.

2\. With so little information about it, I'm not going to hand over my details. I have questions - do I have to download anything? What browsers does it work with? Does it tie into any other social networks? Do sites have to support it before I can comment on them? What does the UI really look like? etc.

3\. You have the very serious disadvantage that you're competing against established competitors (Reddit/Digg/Twitter) that have thousands or millions of users.

In general, probably a nice idea, but you're really just embedding Reddit/Digg/Twitter into the original page. I'm sure there are plugins that'll do that for Firefox and Chrome already.</comment>


Welcome to Windows 8 – The Consumer Preview - <AUTHOR> http://blogs.msdn.com/b/b8/archive/2012/02/29/welcome-to-windows-8-the-consumer-preview.aspx <comment><USER2> Thanks for the share, will try this one out.</comment>


Steam In-Home Streaming - <AUTHOR> http://store.steampowered.com/streaming <comment><USER2> I have been using this on and off in beta. If possible I highly recommend a wired network connection. I have been testing it on a WRT54GL and that was not always sufficient. When my AC router is not misbehaving (ASUS RT-AC66U) I've been able to play online FPS shooters surprisingly well. Fighting games or FPS that are heavily twitch based won't work, but pretty much anything that can suffer the occasional frame drop or isn't precision works well.

tl;dr You may need an N wifi router or better that is rock solid to make things run smooth.

<comment><USER3> You ARE using a 9 year old router, considering that probably all other hardware (PC, Laptop, Consoles, Phones, Tablets, ...) was replaced since then and most cable connections can't be maxed out with that wifi speed (After forward error correction you'll end up with about 30 mbit/s), a lot of things might be happier if you switched that one out :)

<comment><USER4> Which modern router do you propose? I am currently running Tomato, it's a great balance of ease-of-use and customizability. I'm not interested in having to do everything on the command line on the router as well, so if a modern router can run some great version of Tomato, it would be fantastic.

<comment><USER2> Linksys recently launched the WRT1900AC as a spiritual successor (in theory) to the WRT54G, but I'm waiting a bit to see how true that is.

<comment><USER5> Can anyone recommend something a little more affordable?

<comment><USER6> I've had extraordinarily good luck with the apple AirPort Extreme. Handles wifi n traffic and is rock solid. I can regularly play twitch games over it or stream 1080 p without issue.

</comment></comment></comment></comment></comment></comment><comment><USER7> I've been using this more and more lately. Most recently to play Dark Souls 2 on a laptop in the living room rather than having to be sequestered upstairs in the office.

It's pretty amazing how well it runs, with the input lag being minimal and the quality of visuals far surpassing what the laptop could actually handle on it's own.

<comment><USER8> Being a pretty hardcore Dark Souls guy I have to ask - is even that minimal lag acceptable?

I'm just thinking how many invader duels end up being super close, even a fraction of a second here and there adds up. Plus there is already some lag when playing online with friends and/or against an invader to begin with.

<comment><USER7> Best comparison I can make is that playing Dark Souls 2 on the PC over in-home streaming is comparable to playing it on a PS3.

 _Plus there is already some lag when playing online with friends and /or against an invader to begin with._

Any network lag you experience during multiplayer is going to far surpass any noticeable input lag IMO.

</comment></comment></comment><comment><USER9> If you add Chrome as a non-steam game, you can stream netflix to your linux laptop. The audio actually syncs better than it does watching in wine!

<comment><USER10> Can't you use pipelight([http://fds-team.de/cms/pipelight- installation.html](http://fds-team.de/cms/pipelight-installation.html)) for this?

I tested it with some silverlight based services available here (not netflix though) and it worked like a charm.

</comment></comment><comment><USER11> It's really working great, I've been using it for about the past six months (beta) and it always went great, way better than expected. I wasted hours and days trying to come with a similar solution and it always sucked. Glad they came up with something actually _enjoyable_.

<comment><USER12> Tried it a couple of months ago, and it ran like ass. Could be due to older hardware? Serving PC is core 2 duo 6850, and htpc it was playing on is core 2 duo 6400. Wired fast ethernet connection.

<comment><USER13> You want the serving pc to have hardware accelerated video encoding (e.g. Intel Quick Sync), otherwise it runs terribly. Similarly, the client should have hardware accelerated decode, but that is very common.

<comment><USER14> It _may_ be possible to enable Quick Sync on systems with >=Sandybridge chips plus a dedicated graphics card, but I can't find a definitive answer.

</comment></comment></comment></comment><comment><USER15> To anyone running headless systems, it's worth mentioning that this works extremely well for remote control of network systems. I've played with it a bit so far and I'm quite impressed with the low latency/high quality.

<comment><USER16> So I can add Visual Studio to my steam library, and potentially develop in it from my mac? This is huge, I can now run my PC at home headless since I only used it for games/visual studio.

<comment><USER17> I would be interested in the other way around, as well.

Could I add XCode to Steam on a Mac and then stream that on my main Desktop?

I know I can hook up my MacBook to an external keyboard and monitors but I have a very... integrated setup for my main Windows Desktop and hooking up my MacBook with those monitors, keyboard would be quite a hassle.

This way, I could keep it on my couch table and still be able to work on XCode on my big Desktop monitor.

</comment></comment></comment><comment><USER18> So if I want to stream Steam games to my TV, what sort of client hardware do I need on the TV end? Is there an inexpensive box I can buy and use for this purpose? The support articles are kind of vague on what the system requirements for clients are...

<comment><USER19> I just got up and running with a temporary HTPC that is attached to my second TV. Its a crappy Nettop with an Atom and 1x PCI-e ION2.

I'm getting 30FPS @ 720p on the TV streaming a number of games (Civ V, Stick of Truth); I also tried a number of non-Steam games which worked great as well.

Requirements seem very, very modest.

<comment><USER20> It seems like basically the machine needs to be able to push the equivalent video resolution (presumably software codec; In-Home Streaming probably doesn't leverage hardware MPEG decoders) and that's about it.

On my TV I use a 65W A10 in a mini ITX case with a 90W PSU. It has on-chip graphics, HD7660, and it handles streaming at 1080p without getting warm (my network on the other hand...)

I've also used my laptop, an A6 with HD8250 on-chip graphics. It does 720p with no problem (don't know about 1080p, 720p is the native res)

I expect you can go even lower, but if you are building an HTPC the cost difference between an A6 and an A4 is pretty small.

Edit: if you wanted to go tight budget, you might even be able to use one of these: [http://www.newegg.com/Product/Product.aspx?Item=N82E16819113...](http://www.newegg.com/Product/Product.aspx?Item=N82E16819113366)

Edit2: Apparently it does use hardware encode/decode. I think the most recent 2-3 generations of chips from both vendors all have that, but don't quote me.

<comment><USER19> FWIW - on my meager Atom/ION setup I had to turn HW Decoding off in order for it to work properly.

</comment></comment></comment></comment><comment><USER21> "With good hardware and a fast home network, you'll forget the game is running remotely." But with bad or moderate hardware you'll experience wonderful 5000 ms latency and have a horrible time.

It seems like you would need an HTPC anyway to load up steam and send the video from that 2nd computer to your TV. The whole process seems pointlessly convoluted.

I'd rather have wireless hdmi or even a really long hdmi cable from my good computer to wherever the tv is.

<comment><USER22> I have wireless HDMI at work. It's not even close to low enough latency to play games on.

<comment><USER21> Ah, I wasn't even aware that was a real thing. I guess there goes that idea.

</comment></comment></comment><comment><USER23> I tried to do this with VNC a long time ago, so I could play Wizardry 8 on a laptop in the backyard. My wifi couldn't reach to the shady spot of the yard.

</comment><comment><USER24> Whoa, I will have to try this with Raspberry Pi - "How to make 35$ SteamBox".

Btw, just tested it on my MacBook Pro, its awesome to start some CPU/GPU intensive game and play it without fan noise and heat :) Also interesting thing - you can add nonsteam games (battlefield, guild wars, heck even applications - WinSCP etc) and stream them ! This is awesome !

<comment><USER25> I've seen some of the discussion related to SteamOS and the Raspberry Pi. Looks like SteamOS has no ARM support, so that is likely to be a hurdle. Something similar is Limelight which streams your computer to a PI including keyboard and mouse support, but is only compatible with a Nvidia 600 or 700 card.

</comment></comment><comment><USER26> I wish there was a stream only hardware box we could get that I can plug into my TV. Maybe they could port the stream receiver to Android?

<comment><USER27> Not sure if your comment is tongue in cheek, but if not, or for others that do actually have the same thought there are options.

SteamOS [http://store.steampowered.com/livingroom/SteamOS/](http://store.steampowered.com/livingroom/SteamOS/) and [http://store.steampowered.com/steamos/](http://store.steampowered.com/steamos/) will allow for building your own box and they've got third parties working on a "broad range" of hardware options that will come pre-installed with the OS.

<comment><USER17> True, but on order to be _really_ useful, an ARM option would be needed. Just think, a 30 dollar RaspberryPi with a bluetooth dongle popped in the back of your TV and you will be able to play any of your Windows games.

</comment></comment></comment><comment><USER28> What is under the hood? Turbo/*VNC? custom mpeg2 encoder? mpeg4 would be too much for low latency fullhd stuff I guess.

</comment><comment><USER29> iOS client app would be great.</comment>


Ruby `reject!` - <AUTHOR> http://accidentallyquadratic.tumblr.com/post/157496054437/ruby-reject <comment><USER2> I love this blog, but I'm not sure that I agree with this:

> In my mind, I'd just rather not have a reject! at all, and callers who need > to mutate an array in-place can figure out how to do safely with respect to > their own use cases.

We ought to have a standard version of the reject! code precisely _because_ it's so difficult to get right. Saying application developers should solve the problem themselves just sounds like some sort of political move: 'sure they may get the edge cases wrong, but then it will be their fault not ours'.

One of the best things about Ruby is that having helper methods for every kind of possible operation frees application developers from re-solving these edge- case problems and allows them to just write their business logic.

<comment><USER3> Edit: I know this sounds like I am trying to dismiss the problem. That's not my point. I'm trying to say the problem is compounded by the choice to bundle the solutions to several different problems. If people have criticisms I would love to read a reply. </Edit>

> We ought to have a standard version of the reject! code precisely because > it's so difficult to get right.

No, it's easy to get right in any specific case. It's iterating over a dang list, it's the first thing you learn how to do as a programmer. It's only hard to get right if you're trying to solve it for every use case with a single interface.

Essentially: you are taking two different algorithms and trying two switch between them behind a single interface. Meaty if-statements behind flags are an indication this is happening. It's cool of you want that but put it in a library and give it a GitHub per.

An example: I don't use a library to merge attributes on objects. I cut and paste one of a few snippets or write from scratch. Sometimes you want to mutate an object, sometimes you want a copy, sometimes you want to shallow copy or keep a reference to the parent. I could write a nasty complicated function that intelligently solved "the problem". But all that does is bundle together a bunch of different solutions to different problems and make it hard for me to understand which one it picked.

Edit 2: I could be persuaded that what I'm saying is just not Rubyish. I'm a JavaScript programmer (after many years of Ruby) so maybe there's some truth in that. I do think that distancing ourselves from the mechanics of list manipulation can be bad for our code quality.

<comment><USER4> > No, it's easy to get right in any specific case. It's iterating over a dang > list, it's the first thing you learn how to do as a programmer. It's only > hard to get right if you're trying to solve it for every use case with a > single interface.

Isn't any correct implementation of any function that retains any only the elements that pass some predicate going to have to do basically the same thing that reject! does, or else be slow (creating a new list instead of mutating in place)?

I guess there's a somewhat simpler implementation that would work for some use cases (those in which order is not important) that just swaps in the last element instead of removing. But if maintaining order is important the complexity is similar.

I think that what would happen if Ruby didn't include reject! is that most programmers would just needlessly create new arrays all the time, since that's easier to write.

<comment><USER5> In this case, perhaps mutability is the real problem. Array#filter is quite fast in JS and never mutates the array.

<comment><USER6> it might be quite fast, but it's never going to be as fast as a mutable version of the same thing. there are plenty of cases where you have many (millions?) of elements and want to remove only a few. in that case, copying an array of many elements for the sake of immutability is quite wasteful

*edit: i say never, but if you do cool stuff with referencing array ranges so that you don't copy, but reference the unchanged parts of the previous array then sure, but that's more of a low level feature of the language (eg erlang and clojure both do this i thiiiink?) than something you'd want to implement in a library because it can be suuuuper tricky to get right

<comment><USER7> No one does immutability with copying, that would be a joke. There is also nothing tricky about not copying full lists on append at userland lib, just more advanced data structures.

Yes, it won't be as fast in modifying. But it will be a lot faster in other operations, so it's a trade off and you chose appropriately for your use case.

Plus, it's a lot easier to read and understand "immutable code".

</comment></comment></comment></comment></comment></comment><comment><USER8> Shameless plug:

After years working with Ruby, I felt that "bang" methods should only be used for methods which mutate the receiver. Many methods which _do_ do so do not have a "!" at the end.

To that end I created a little library called "Bang All The Things" :) [https://github.com/pmarreck/ruby- snippets/blob/master/bang_a...](https://github.com/pmarreck/ruby- snippets/blob/master/bang_all_the_things.rb)

I'm convinced that this simplification helps prevent bugs, at the minor cost of changing some conventions possibly borrowed from other languages.

I have since (mostly) moved on to Elixir which does not have the "mutability problem" at all.

<comment><USER9> > I felt that "bang" methods should only be used for methods which mutate the > receiver.

I mentioned this upthread too, but it's a bit broader than that. Consider [http://api.rubyonrails.org/classes/ActiveRecord/FinderMethod...](http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method- i-first) vs [http://api.rubyonrails.org/classes/ActiveRecord/FinderMethod...](http://api.rubyonrails.org/classes/ActiveRecord/FinderMethods.html#method- i-first-21) for example. The ! version raises an exception rather than return nil.

<comment><USER10> I actually like the ActiveRecord convention more than destructive-to-receiver -- it was even adopted by the elixir community (which makes even more sense than ruby, as there really aren't destructive updates in elixir).

</comment></comment></comment><comment><USER11> I think that perhaps the most interesting part of this article is that it comes from a blog called 'accidentallyquadratic' with more than one entry.

<comment><USER12> I remember coming across it before when the left-pad incident happened, and marvelling at the fact there were already many entries there then. The problem is now, whenever a new entry on this blog gets linked, I find myself compelled to go back and read all the entries in it again. I can't help thinking that over time, that process is going to become prohibitively slow.

<comment><USER13> This should be the highest voted comment on hackernews, or we're doing something wrong.

<comment><USER11> it's pretty elegant.

</comment></comment></comment></comment><comment><USER14> One of the more confusing parts of the C++ standard library algorithms is remove/remove_if. A new user would think calling remove(v.begin(), v.end(), value_to_remove) would result in the value being removed from the container[1]. Instead, they'll find that all it did was shift around the ordering of the vector and leave the elements you wanted removed in place at the end (if you read the linked article you can already see where this is going) which is a very unintuitive result. They might look up the function signature and notice it returns an iterator which is also surprising.

Even after discovering they have to call the container's erase method using the result of remove and an iterator to the end of the container[2] they'd probably just decide that remove just has a terrible design. It takes experience and some data structures knowledge to realize why it is designed the way it is.

The design of remove means every element that remains are only be shifted (in the case of an array/vector), at most, one time. The naive approach results in the problem described in the article where you are constantly shifting the elements forward as you progress through the container.

The usability of remove is still a problem (the concept shouldn't need a wikipedia page explaining it) but the way it was done was done for good reasons (within the design decisions of STL at least). It's probably fixed in the C++ ranges proposal but I haven't looked.

D's standard algorithm library remove[3] (which is very much based on Stepanov's STL too) goes one performance step further and lets you specify the swap strategy so that if stability isn't a requirement the number of shifts required is the absolute minimum possible (essentially moving elements from the end of the range into spots freed up by the items being removed).

1\. Slightly more experienced users would quickly notice that it can't remove the value, it has no reference to the container to change its length.

2\. So common and unintuitive it gets its own wikipedia page: [https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom](https://en.wikipedia.org/wiki/Erase%E2%80%93remove_idiom)

3\. [http://dlang.org/phobos/std_algorithm_mutation.html#.remove](http://dlang.org/phobos/std_algorithm_mutation.html#.remove)

<comment><USER15> My homegrown C dynamic array has remove() macro with the same purpose (I didn't know it is in c++). Except that it takes range instead of index and doesn't move to the end, because you checkout/delete item first, and then remove, not vice versa. It also has insert function that does guess what. The module takes around one screen.

Cool thing is that it is not C++, where remove is hardcore stl magic, and I can just iterate over elements' memory and remove them in sliding ranges, so multi-remove problem simply doesn't exist. Idk why c++ overengineers everything. We abstract a generic vector away from our convenience only to to store items in regular array, because it is the only fast solution for generic cases.

</comment></comment><comment><USER16> Why is `reject!` even a separate, and different implementation than `select!`? Perf reasons?

Haskell's Data.List doesn't seem to even have a remove/reject. Clojure's remove is simply a complement of filter.

<comment><USER17> Same reason ruby has both "if" and "Unless", or capybara has .to_not as well as .not_to... there are times when the inverse expression is just more natural and less confusing.

Rubocop, on the other hand against what I've just said, will tell you in almost every case that you might use Unless, or in agreement with what I think it is that You are saying here, the preferred idiom is to not use the inverse, and you should only say "unless" when what you meant to say is unambiguously !if.

IOW sometimes you really mean reject

<comment><USER18> I don't think the commenter is asking why the method exists. But more why is it that the bug exists with reject! and not select!. Why the underlying implementations of those two very similar methods different?

<comment><USER17> I caught that too late to avoid the downvoting, shame on me for commenting before I rtfa

<comment><USER18> Ah, all good. It happens.

</comment></comment></comment></comment></comment><comment><USER19> Avoiding this should be as simple as using the inverse, `select!`, and then flipping whatever the check is in the block, right?

<comment><USER17> I think that only half avoids it, or shifts the wrong side of the big O to opposite of wherever it is now. select! also mutates in place.

But I'm not totally sure about that, after reading the Rubydoc for Array[1], only reject! has the warning about mutating the array every time the block is called, select! does not have any such warning. You might be right.

[1]: [https://ruby-doc.org/core-2.2.0/Array.html#method-i- reject-2...](https://ruby-doc.org/core-2.2.0/Array.html#method-i-reject-21)

</comment></comment><comment><USER20> I can't agree with the conclusion. Sure complexity is complex, but the solution here would seem to be better performance analysis of the standard library rather than blindly avoiding risk. How do you know where to stop? All built in block-accepting methods for enumerator types would seem to be equally risky in this analysis.

<comment><USER21> Without much knowledge at all, I'd agree with the conclusion that "block- accepting methods for enumerator types would seem to be equally risky". It sounds to me like having non-pure functions that can terminate at any point. And that sounds like asking for trouble in your code.

I like my safeties in languages though.

</comment></comment><comment><USER22> So what is the right way to do the same thing? Use `select` and get new array included elements we want to keep instead of using `reject!`?

<comment><USER23> That's what languages with immutable data structures do. Internally they implement simple data structures (lists, arrays) with more complex ones not to get a performance hit. For example, they don't want to copy every byte every time they add or remove from a list.

In ascending order of complexity

[http://theerlangelist.blogspot.com/2013/05/working-with- immu...](http://theerlangelist.blogspot.com/2013/05/working-with-immutable- data.html)

[http://concurrencyfreaks.blogspot.com/2013/10/immutable- data...](http://concurrencyfreaks.blogspot.com/2013/10/immutable-data- structures-are-not-as.html)

[http://debasishg.blogspot.com/2010/05/grokking-functional- da...](http://debasishg.blogspot.com/2010/05/grokking-functional-data- structures.html)

In the case of Ruby, it's a language build on mutability so let's use mutable data. There are already plenty of languages with immutable data to use if we want to.

</comment></comment><comment><USER24> Quite a comprehensive Post ! What makes Ruby block an essential feature of language is it's power and elegance.

</comment><comment><USER25> I think worth clarifying, the fix on svn r49255 is in git tag v2_3_1, so if you're on ~2.3.1 Then you're back to linear #reject.

</comment><comment><USER26> I find it weird that the case is called a "bug" multiple times. Sure, if its o(n^2), that's a problem, but if the code works correctly at the end, it's not a bug.

<comment><USER27> O(n^2) algorithms are insidious in that they will work fine on test data, but will ruin performance when there's an unusually large input in production. They're landmines in your code.

<comment><USER28> You do know that the most popular general-purpose, comparison-based sorting algorithm quicksort has a worst case complexity of O(n^2), right?

<comment><USER29> Good implementations tend to address this with introspection, randomization, etc..

</comment></comment></comment></comment><comment><USER28> Can't wait for the entry on quicksort.</comment>


Ask HN: Ridiculous Coding Practices by companies you have worked for - <AUTHOR> I once worked for a company that did not allow us to use object-oriented programming. This is because their 2 most senior programmers did not know OOP.
Other things include putting a lot of business logic in stored procedures (SQL) so that migration is easier.
We were also not allowed to use folders, all web pages should be on the root directory. I can't remember the reasoning for this. <comment><USER2> Version control done wrong:

Version was code written onto a CD-R

Control was a person who got a full 60K Salary for monitoring a room with a bunch of file folders with different versions of the software. When you made a commit you burned a new CD and brought to Tim on the 5th Floor.

You can't make this stuff up.

<comment><USER3> I thought I had the worst version control story but you won by a large margin. None the less, here's how version control worked at a place where I was contracting:

They used VSS for version control and in team of around 30 people only two folks had check in access. So how do I check in my changes? When you are ready to check in your files, you fill in a 'blue sheet' (a blue paper with form printed on it) __by hand __. You are supposed to write name, location on your computer for that file, VSS location of the file and comment for each file which you want to check in (by hand on blue sheet). I used to take one day to implement a change request but would take as much as two weeks just to check in the damn files as those gate keepers were always busy. And god forbid if someone else checked in the file which you intended to check in. The gatekeeper will send you back to reconcile the changes and you will be again at the end of the queue. Trust me, I used to get 'blue sheet' nightmares!

When I asked them why they have this weird policy, I was told that it was to prevent people from checking in the code with breaking changes and enforce code review. Mind you, while I was there, gatekeeper didn't review my code even once. Reminds me of the monkeys and banana story.

<comment><USER4> You thought you have the worst version control story? What's version control?! Seriously. All edits made locally and "tested" by direct upload to the production server. Different "commits" tested by file renaming. file.asp.old, file.asp.old.xx, file.asp.5.25.2002

"Hey Tony, are you working on blahblah.asp? Oh, no?, Great, let me just pull a copy, don't work on it until I say I'm done OK?"

I was fortunate enough at the time (circa 2002) shortly after my arrival to put svn into place. I gotta say though, once you now how to do something the completely wrong way, it's much easier to do it correctly. Ugh.

<comment><USER5> I thought for a second you were describing the place I used to work at. Only it was PHP, and the database was a 'free' version of a commercial database which was already several years out of date when I joined...<shudders/>

</comment></comment></comment></comment><comment><USER6> I once had a boss that forbade regular expressions, including split().

The task was parsing datasets in a variety of formats (one per vendor, hundreds of vendors.)

The only acceptable way was substr. Everything else causes "memory fragmentation," apparently.

The language was Perl.

<comment><USER7> Yeah, Perl shops can be weird. I was told not to use map or grep because they are "too hard to understand". How?!?

<comment><USER6> Sadly, it was not a Perl shop. I was one of only a few developers.

My next job was at Morgan Stanley, which had great infrastructure, both for Perl and otherwise.

</comment></comment></comment><comment><USER8> I've been discouraged from putting code in reusable modules because it would mean one central location for everything to break. The rationale was that if every routine was copied and pasted where it was needed then introducing an error in one place would not affect other places.

I am leaving a company that uses a certain lightweight language to build web apps using CGI. There is no way to load libraries except by recompiling the runtime, and we do not have the C source code for that runtime in our possession. This means every library out there (even for the particular language we use, thanks to the fact that we're using a 9-year-old version of the language, and the inability to load binary libraries) is NIH'ed out from the start! Interfacing with external tools is broken because the function that runs system commands has been changed to be async with no access to the standard streams of the process it creates.

The product that is built on top of this is designed to let people build applications using flowcharts with a visual editor... but the "programming" that is the result of this system is essentially spaghetti code with GOTO, numbered labels, and a single global scope. Nodes in these flowcharts are labelled with 100, 110, 200, etc. by default and are laid out automatically, so there's no way to understand a routine at a glance. Variables in a flowchart get clobbered by other "subroutines" when they are called. Everything is indirections on indirections on indirections. I could go on... but you can get the idea by looking at this: <http://imgur.com/ZKCU.png>

This is all seen as advanced next-generation modeling that provides massive productivity gains over standard programming practices.

At one job I introduced SVN and Tortoise to try to bring version control to the project. A few weeks later we were using Visual Source Safe because the contractor goons couldn't grasp anything but VSS's Visual Studio integration. They also moved to doing _development_ on one shared drive so that updating the whole tree could clobber someone's changes that weren't checked in.

I was also instructed to not use document.getElementById(), since the IE de- facto "standard" was to just refer to the element by its name (or whatever was going on back then).

<comment><USER9> > I've been discouraged from putting code in reusable modules because it would > mean one central location for everything to break. The rationale was that if > every routine was copied and pasted where it was needed then introducing an > error in one place would not affect other places.

Ha, I've run into this one as well. Blew my mind, they actually thought of this as smarter because it avoids any single point of failure in the code, like a battleship where there's a spare everything. Some people are just too stupid to be coding.

</comment></comment><comment><USER10> I actually once worked for a large insurance software company. They had a desktop workstation application that was entirely written in C. It consisted of about 2000 DLLs, which were used to get a kind of primitive polymorphism. Most of the money came from "customizing" the app for clients, and most of the labor for that came from local community colleges, where they had an intro to C programming class where they implemented a doubly-linked list. As a result, these "local talent" programmers would only use doubly-linked lists for collections, and would _re-implement it every time they needed a new collection!_ As a result, every customized app had about 500 re- implementations of a doubly-linked list! (There were more collections than that in the entire app, but the core was written by competent programmers.) And yes, the same mistakes were made each time, and it was re-debugged _every time_.

I was there on a project where the client's IT department had implemented a universal library for doubly-linked lists. None of my fellow programmers understood how it worked (clever use of macros to get pointer offsets) and management would only use it for that particular client.

(They charged hourly for the "customizations.")

</comment><comment><USER11> I interned for a health care company where the lady in charge of my work had a Microsoft Access database with a single table. That table had something like 500 columns. I spent a week or so understanding and created a decent normalized relational database model. I was not allowed to make any changes. The reason given was 'You will leave, who would understand and maintain all these tables'

<comment><USER12> _The reason given was 'You will leave, who would understand and maintain all these tables'_

Well, that's a good point. Fixing the database is great, but there has to be someone who understands the system after the intern leaves. At that point you need to figure out who would maintain after you leave and get them to be the champion of the new system.

</comment></comment><comment><USER13> I'm apparently too opinionated to survive long in insane environments, but I did intern for a company that, in Java, did a couple of really disturbing things:

1\. Every Java exception that can possibly be thrown from a method must be caught, logged, appended to a new Java exception, and re-thrown. Fully 2/3rds of the code base was this sort of make-work.

2\. They followed the traditional naïve model of distributing a system: break it into functional units, and put those on different machines. Win! Well, except that now every single query needs to talk to six machines, all of which need to be up.

3\. Their system, running RMI, was of course implicitly multithreaded, because that's how RMI works. I didn't see in the codebase any real attention paid to this, so I asked about it and the project lead said "the two guys who know threading aren't in at the moment, but we'll schedule a meeting Tuesday when they make it in" on a team of thirty. Needless to say, the resulting system was a complete mess...

<comment><USER14> I haven't programmed Java besides some tiny things so I'm curious about #1. Suppose someone wanted to log all exceptions. How would you go about it in Java?

<comment><USER13> Well, you certainly don't need to log and rethrow them at every call site, because Java exceptions contain a stack trace. Sometimes rethrowing is necessary, because of Java checked exceptions. Sometimes exceptions are benign. The best rule I've seen is the follows: never catch an exception if you can't handle it (either by dying, wrapping it to work around Java lameness, etc.).

<comment><USER14> Logging all unhandled exceptions can be an additional measure for ensuring quality. You have coded defensively, you have done a careful testing but it still crashes. It happens.

I do agree with your point that logging exceptions that might be handled upwards the call stack is silly and probably makes the whole log useless.

</comment></comment></comment></comment><comment><USER15> Your point 2 is far from ridiculous. We do it that way so the business logic exists and is enforced in one place rather than being scattered around this desktop app and that website and so on. Only the most trivial applications can afford to put all their business logic in the middle tier.

Also I'm not allowed to use OCaml in production systems because too few people at the company speak it. Annoying for me, but again far from ridiculous.

<comment><USER10> Point 2 is a bad idea. SQL stored procedures are not a good way to implement business logic. Of course, people who hold the opinion that OO is a bad idea would think it's a great way -- it's pretty much the opposite of OO.

 _We do it that way so the business logic exists and is enforced in one place...Only the most trivial applications can afford to put all their business logic in the middle tier._

There are much better ways of enforcing business logic and controlling it all in one place, which would be compatible with configuration management/source control and much more convenient for most programming teams.

(Namely: just publish the business logic as a _library_ and have standards that dictate its use. These can be enforced using automated scripts and a little process. You are also not restricted to the middle tier, though I'd still say it's a good idea.)

<comment><USER16> Stored procedures don't seem like a bad approach to me. You can provide versioning support by doing something much like Rails migrations. Providing access to the database through stored procedures basically is publishing business logic as a library. I'll admit pl/pgsql looks a little funky, but it doesn't seem too bad.

I'll note I'm not talking from experience here, I'm just speculating and hoping for somebody with more practical experience in the matter (or better insight) to enlighten me.

<comment><USER10> If it is "basically...publishing business logic as a library" then why incur the expense of using such a scheme? Just publish the darn library and put it on a read-only shared directory. Why give up the use of purpose built version control and programming tools? Why give up the modularity and increased productivity that a high level language can give you?

Most of the time, it's because the organization thinks in terms of SQL and relational tables. There are better ways to do business logic.

</comment></comment></comment></comment><comment><USER17> Promote code that's indented 3 spaces instead of 2: rejected by QA.

Promote code that deletes the entire production Customer Database if the user hits "Esc" on Form 11 by accident: no problem. Unless it's indented 3 spaces instead of 2. Then it's rejected.

<comment><USER18> >> Promote code that's indented 3 spaces instead of 2: rejected by QA.

I understand that QA rejected it if the coding style stated that 2 spaces should be used for identation.

<comment><USER19> > I understand that QA rejected it if the coding style stated that 2 spaces > should be used for identation.

I reject your comment because you used two >> to denote a "quote" instead of a single >.

<comment><USER14> The difference is that Hacker News does not have Commenting Standards that state number of > to use for quoting, unlike his company which probably had Coding Standards stating number of whitespaces to use. Working with code written by 3 people if one of them used 4 whitsepaces, other used 2 and 3rd used tabs is just terrible.

</comment></comment></comment></comment><comment><USER20> A company I was at created huge arrays of data structures, many of which contained nested arrays of data structures, which were eventually serialized and rpc'd to another server. Since this was written in C, and they felt malloc was too hard to do correctly, every structure was stack allocated, using a MAX_SIZE number of elements per array, all memset'd to zero.

It didn't take long til everything started crashing from buffer overflows, so they just increased each MAX_SIZE definition to some ridiculously huge value. This made some of the top level data structures hundreds of megabytes. Developers complained that memset would take multiple seconds to run, and so they suggested just removing the memset calls to make the code "more efficient". Another developer suggested replacing all calls to "abs" with "if (n < 0) { n = -n }" because it would also be faster. I quit soon after that.

</comment><comment><USER21> We worked on a web application. The web-code (asp) and business layer (vb) were under source control. We used visual source-safe, which was ridiculous enough (though not my main gripe).

My main gripe is that while those two parts of the project were under source control, the database definition was not. So, while we could revert back to a previous version of the code, there was no way to revert back to the database schema that the code relied on. We were able to autogenerate database creation scripts (which we would use for deployments) but management would never let us check those script in under source control (which would have solved a lot of problems). The manager was a guy who liked to let wizards auto-generate code for him, and the idea of maintaining a sql-script that contained several thousand lines of code was just too much for his brain to handle.

<comment> brown9-2 I think the kind of place where managers dictate what developers can check in is a place you should run away from

<comment><USER21> I did!

</comment></comment></comment><comment><USER22> Our company spent US$50K on an Oracle database and my boss forbade me from using triggers, because he wanted the application to be database independent. Never mind that we used Oracle syntax in our queries.

<comment><USER23> Also: not allowed to use Oracle's native date data type, and no foreign key constraints allowed!

<comment><USER24> How often does one actually switch between databases? I can see that yeah, some projects have a very slight change of migrating from mysql or postgres to oracle if they are really successful. But for many projects, the time and pain spent on using a database abstraction layer, or even worse building one is a total waste of time. Not that I mind using a well written ORM like active record, the benefits from that doesn't come mostly from that it's database agnostic.

<comment><USER25> When you have many clients each with a diff database. All other times the argument is moot.

</comment></comment></comment></comment><comment><USER26> Extensive use of Hungarian Notation ("i" before integers, "sz" before C-strings, and the kicker: "ob" before objects).

No use of STL, using a hand-rolled dynamic array instead that grew by a constant size instead of doubling.

Extensive amounts of application logic written right in the GUI builder's generated event handlers, for the company's very large flagship product.

<comment><USER27> Hungarian notation makes sense if (a) you have to declare all your variables at the top of the function, so you can't see the variable types, and (b) you don't have a code browser that gives you type information when you hover over a symbol. More and more, neither of those are true, so I find Hungarian fairly useless.

<comment><USER28> We used systems Hungarian notation for LotusScript because older versions of IBM Lotus Domino Designer had limitation (b) along with some other problems. It was actually helpful in understanding and maintaining complex code. But we always understood that we were doing it to work around editor flaws rather than because systems Hungarian notation was a good idea in general.

</comment></comment></comment><comment><USER4> I'm sorry I have to extend this to hardware/environment issues. Four tech people in company (including a web designer). One guy managing the network remotely from some other office location. Only access to production servers off-site was through VPN, common enough right? Fine, but instead of figuring out how VPN passthrough/NAT/ports worked on the Cisco sitting in the closet, the sysadmin settled on getting everyone who needed access to the server their own static, external IP addresses. Not only were they paying extra for these on a monthly basis, but we had these poor early XP boxes sitting on direct connections to the internets. Firewalls are for jerks, eh? Oh, and to make matters even funnier, when you were connected to the VPN, you couldn't get email or go on the internet, because no one had ever figured out that the "use default gateway" option maybe meant something.

</comment><comment><USER29> We were explicitly barred from using tools that were not published by Microsoft. Even if Microsoft didn't make a tool to solve the problem. Instead, we were encouraged to create our own, on our own time, outside of regular business hours.

The same place barred the use of code generators, the use of snippet macros, and they barred admins from creating automated scripts/utilities to automate gruntwork. They likened it to taking a math test without a calculator -- you should be able to do it by hand if you can supposedly do the job.

The same place also required that comments were not to be made in source code files. They should only be made in source control check-in comments.

The same place felt refactoring was an unproductive activity unless it corrected a specific "bug". Scalability and performance issues weren't considered valid bugs - it was fast before, so why would it ever be slow now? Blame would be put on the hardware until network ops bit back. Then you would be lambasted for your application not scaling 4 orders of magnitude on the same hardware when that wasn't part of the original requirements.

One place I worked for did not allow developers to use the bug-tracking system. Instead, someone from QA would place printout of open bugs in a bin. You were required to take the bug from the bin, back to your desk, and when completed, fill in a form by hand detailing the explanation and attach the appropriate colored paper strips in the right order so it could be triaged appropriately.

The same place migrated customer data to their product by hand. Using Excel. We jokingly referred to this process as "electronic handcrafting". The reason was because it was faster and resulted in fewer reported defects after deployment. Someone in that department got fed up, so she had me create ETL processes for the four most common competitor products. Time-to-install went from 4 weeks to 4 days and the error rate dropped 98%. It won over the COO and some staff, but made me enemies with plenty of others.

At the same place a sales manager convinced the COO that RAID1 should be considered a viable backup and disaster recovery solution. We were tasked with making it so RAID controllers would not back up certain types of files.

Another place I worked for as a contractor insisted that their web app was written in ColdFusion. Despite not having any other contractors past or present, and the market not having any ColdFusion developers. The reason ended up being is it because it "sounded cool". Needless to say, they have an app still running on ColdFusion 4.

I've worked in too many places that are adamant that "backups" are all the database version control they need.

I've worked at a place that would expect me to develop APIs for certain products and systems we had, yet refused to allow for a requirements gathering phase. I was actually fired trying to explain that I can't build something when I don't know what I was building. Reason was so the new CIO could bring on a contracting firm run by a friend of his. Three other people have since quit in response.

<comment><USER30> How did you find so many bad jobs (they sound horrendous)? More importantly, why did you take them, let alone keep them?

<comment><USER29> Inexperience, and a tendency to be a "saver". I've since learned how to read between the lines, ask a lot of questions hiring managers aren't expecting to be asked, and to request interviews with team members if it isn't offered (and refusing the position if my request is refused).

Additionally, you'll hear enough horror stories if you talk to those who work in IT departments in regular companies that aren't doing anything interesting because no one's been able to present a solid business case as to why IT can add value or affect the bottom line. Though sometimes the works is simply gummed up by political battles and everyone's afraid to go to HR or to make an attempt to knock down those walls in fear of losing their job. What you read about on HN is what you'll see at the right-end of the bell curve, and often isn't representative of your average company.

Most of these issues were driven by politics. In a lot of situations (electronic hand-crafting, manual bug-tracking) I was able to drive change from within. Granted, they took months. However people were afraid of opposing the head of QA because A) she was a lifelong friend of the founder's life B) she was predisposed to think all developers were idiots C) they weren't equipped to traverse that delicate political minefield without at least losing a leg in the process.

The scalability/performance issue one? This was at a private sales-oriented company with a billion dollars in annual revenue. Again, mired in politics. Their entire e-commerce system was built by guys who were completely green at the time, and they hacked it together. He was best buds with the CIO, and was... a pretty passionate guy, and very defensive. The average person with a spouse and kids to support didn't feel it was worth risking their job to improve the architecture if they couldn't present a decent argument and it came across as hurting his feelings. Me? I spent far too many lunches talking with developers, guys in network ops and analysts to come up with ways to cache data and partition functionality so the thing could handle the existing load and scale in the future. It took buy-in from stubborn developers who normally pointed the fingers at the database or the servers, network ops guys who pointed fingers at the developers, and a testy data architect who had a serious row with the development manager.

I've learned _a lot_ from those experiences, especially the social problems that can exist in team-based development, and how to present solutions where even the most stubborn-minded individual can "get it". I've also learned that these problems exist nearly everywhere, just more so in some environments than others, and when you can solve these problems and when it's instead best to learn and move on.

<comment><USER31> BTW, your profile lacks contact information despite you asking to be contacted. :-)

<comment><USER29> This should be corrected (thought I updated it a while back, info is certainly there). If not, send a tweet to @robgomes.

</comment></comment></comment></comment></comment><comment><USER32> I was barred from using recursion because it would confuse people. My response was we should fire these people. Authority won.

<comment><USER12> Barring people from using recursion is certainly bad, but firing people who don't understand your recursive code is probably worse.

</comment></comment><comment><USER33> We're limited to what we can do/use by the technical depth/breadth of the 'architects' (mid-level devs at best) that we have. Pretty much limits us to java 1.4 and earlier and libs that have been open source for at least a decade.

I'd written some script in ruby to help us automate some maven grunt work and they said they'd rather spend 6 hours doing it manually than run ruby as they hadn't vetted ruby.

<comment><USER15> Quietly do your work in Groovy then...

<comment><USER33> that's kind of what I do: since I work at about 25% capacity most of the time I'm learning the inner guts and glory of ruby for projects outside of work.

</comment></comment></comment><comment><USER34> Our entire system was written in ColdFusion. I was asked to add a feature. That feature was to be embedded in the ColdFusion system within the nested includes and infinite scope of tag mush.

It had to be written in PHP. Why? Because we were moving to PHP.

So I wrote it in ColdFusion and used PHP REST webservice to get the data.

I still to this day do not understand why that system is now part ColdFusion, PHP, Flex, and Perl. :)

Great company though, excellent people to work with.

<comment><USER35> It's called legacy it happens companies have been working on a code base for more than couple of years, and the current trends change.

</comment></comment><comment><USER36> I was once banned from using ternary operators, that was weird

<comment><USER37> have you ever seen them abused ? you'd understand why : (or at least have you thought about it ? you'd understand why : (or at least you can get the gist from this ? good : I can't help you))

<comment><USER8> That was perfectly clear to me... :D

<comment><USER38> I think what he meant was more something like this:

      $row[6] = $src?str_replace($src,($table[$src]?$table[$src]:$src),$row[6]):$row[6];

[Edit] It's not quite so clear when it's not in English, methinks.

</comment></comment></comment></comment><comment><USER39> I was working for an airline website - which was weird, because I had been promised I would be working on something else. I bit my tongue and agreed to it, since it sounded like fun.

Then the Chairman of the company, a fellow who supposedly had a law & math degree, told me that he would be doing the design with me (???). I sat down as he started writing buzzwords on the whiteboard. I jotted down a bunch of nonsensical words like "powersearch", "hypersearch", "megametasearch", and tried to write down what each meant.

Once the buzzwords were out of the way, it was onto the real meat and bones - the design!... except, in his own words, "At XYZ, we design the database FIRST and then design the program on top of that". Think about it. No objects, no user story, no nothing - just "DESIGN THE DATABASE". So I sat slackjawed as he started listing stuff like "Oh, we can use an enum for the airline companies... hmm, I wonder if int is too big for the id, maybe we should use smallint?". I tried to steer him towards the more fundamental questions of "What exactly do we want?", but he was having none of it.

I spent 4 months working on that software, and 2 more months wasted in other ridiculous projects he had before I tendered my resignation.

</comment><comment><USER40> It seems to be a common problem that, although the will is there to improve practices, persuading higher-ups is almost impossible.

Although many of like to think that cold, hard logic is the only suitable method of reasoning with somebody, the reality is that even programmers are somewhat human. We're all proud, emotional souls.

If, like me, you've spent half a lifetime on your own, hacking and tinkering with computers, your skills in handling people may be somewhat underdeveloped. I've recognised this in myself and have been trying to do something about it. I can thoroughly recommend Dale Carnegie's classic book:

[http://en.wikipedia.org/wiki/How_to_Win_Friends_and_Influenc...](http://en.wikipedia.org/wiki/How_to_Win_Friends_and_Influence_People)

In most cases, it should be possible to win over the stubborn manager or sensitive programmer who's blocking any progress towards sane development practices. There's plenty of material in the Carnegie book suggesting how one can gently persuade people, i.e. how to win arguments. In hindsight, a lot of the book's advice seems obvious and corresponds with my own experiences, but I needed somebody to make it all explicit.

I have first hand experience of having to placate a sensitive, confidence- lacking programmer. A few times it's been necessary to reject his ideas or code, and he's taken it very personally, being unable to separate in his mind an 'attack' on his work from an attack on him. Once you know how, it can be fairly easy to reassure him.

I've never had the problem of a stubborn manager who thinks he knows better, but I have a good idea of how I'd approach him and try and persuade him of the right way to do things. Then again, I still feel like my people skills are great only in theory, and somewhat lacking in practice.

<comment><USER41> I agree, but ideally you're goal should be to avoid these environments in the first place.

</comment></comment><comment><USER42> I had to set lots of `visible?', `touch sensitive?', etc., flags based on Boolean expressions. I ended up with things like

        foo->vis = a || (b || !c && (...)) && z;

Coding standards, and the arbiters at code review, insisted on a nested set of if-then-else statements comparing, e.g. a == TRUE, rather than just `a', with the many blocks being either foo->vis = TRUE or FALSE as appropriate.

This resulted in my two or three line statements turning into many more lines, which then gave them cause for concern because their style had swelled functions to where they thought they were getting too large!

Plus, the C compiler, one of IBM's, produced better POWER code for my line than theirs.

I finally got them to back down when I gave them a code sample in their style for study. Even when I pointed out it had an error they couldn't find it. I'd deliberately missed an else-block off an if-statement that had started a dozen lines before. This would mean foo->vis sometimes wasn't written to at all; impossible with my version.

</comment><comment><USER43> We cannot download a single piece of software that is not approved by the 'Open Source Council' - a group of reactive retards who if they ever did their job would already have a tool ready for all the situations they have nothing but bemused confusion to offer for the advice they are purported to give to us. I work for a crappy insurance company. My coding life 9-5 sucks.

</comment><comment><USER44> I remember a couple jobs ago, back in 2004 we were stuck using JDK 1.1.8 because the IDE we used didn't support anything better, like 1.4.2. The IDE was MS Visual J++ so you can imagine my pain.

<comment><USER45> circa 2002, if you only use jdk 1.1.8 ,I think MS visual J++ is one of the best Java IDE.

</comment></comment><comment><USER46> I've used source safe, which is pretty much the most brain damaged way to do source control ever invented. "Could you unlock that file please?"... Thank god for svn and git.

</comment><comment><USER47> Does a ridiculous lack of any coding standards whatsoever count?

<comment><USER48> Isn't that more the rule than the exception?

</comment></comment><comment><USER49> I was paid over six-figures to share a computer with another programmer all day long even though studies have shown that to halve productivity.

<comment><USER50> i sense a troll

</comment></comment><comment><USER51> The last two points seem to be pointed towards architecture decisions, not necessarily coding practices. I see coding practices more as language selection, indentation styles, the forced use of asserts or null checks, etc. ... Things that say how you write, manage or release code.

As for the very last point, maybe someone had some data to show that sub- domains increased response time. Alternatively, maybe subdirectories inadvertently introduced less code re-use at the company. Who knows. In business, sometimes there are stupid rules simply because someone thought it was cool. You either abide by it or bring forth some data to show why the rule is wrong (or could be better).

</comment><comment><USER52> Rumor has it theres a coding standards manual floating around at IBM that forbids the use of pointers. In c++. Yes indeed.

<comment><USER53> No problem

      template <typename T>
      class NotAPointer {
        T* m_pointer;
        T* set(T* p) { return m_pointer = p; }
        T* get() { return m_pointer; }
        NotAPointer(T* p) { set(p); }
      }

Just outsource that and you're pointer free!

<comment><USER26> I see how you've cleverly perpetuated the policy by forgetting to make the methods public.

<comment><USER53> As it was the first C++ I've written in nearly a decade, I'm surprised I remembered as much as I did. I should have also made the set parameter a reference to better obscure the involvement of pointers.

</comment></comment></comment></comment><comment><USER54> About ten years ago, a telecom company (which no longer exists since it was purchased by a larger company) I worked for refused to allow us to use anything open source.

<comment><USER55> Sometimes that makes a lot of sense. The GPL's viral natural can cause serious problems. for a business Everyone at Microsoft is banned from even looking at GPL'd code.

<comment><USER56> Yes, and Microsoft's attitude to Open Source and Free Software is well known for its rationality and basis in fact.

<comment><USER55> I'm not talking about Microsoft's general approach to conducting business over the last 30 years.

Microsoft (and many other large software companies) prohibits their programmers from viewing GPL'd source code. This policy is based on the shark- infested waters of our litigious society.

This is Microsoft's open source division: <http://port25.technet.com/>

They have to be kept away from the proprietary intellectual property. It's like separating your dairy and your meat when keeping Kosher. Microsoft has to separate tainted developers from untainted ones.

</comment></comment></comment></comment><comment><USER57> Where I once worked, the -> operator was forbidden to appear in the C code we wrote. In place of w->x or f->title you had to write stuff like WIN(w,x) or FRM(f,title). WIN, FRM and the like were just C preprocessor macros. This was all to allow for some kind of weird future structure compatibility manageable by tricky macro redefinitions but I was never quite convinced.

</comment><comment><USER58> I worked at a place that for the most part banned vowels from database column names.

I hope you feel better knowing that you probably bank there ;)

</comment><comment><USER59> Our HTML dev team builds the HTML/CSS so that we can complete our UI specs, then when we hand off the final HTML/CSS and UI spec to our big money development team, they rebuild it from PSDs. They use the same CSS structure framework, so there's no good reason, but we basically pay for the same work twice. If we send code, they throw it out.

<comment><USER30> Don't take this the wrong way, but how would you rate your team's front-end code? And compared to what the other guys turn out?

I've rebuilt many a template when the code given to me is in bad shape.

</comment></comment><comment><USER60> At an internship I had back in university, I worked for a tiny startup where the CEO imposed the following restrictions:

* No STL ("too slow", and other reasons) -- had to roll our own giant, buggy core library

* No member variables ("compilation too slow") -- had to put everything in a predeclared struct, have a pointer to it, new+delete every ctor/dtor

* Wasn't allowed to use "configure" -- instead, we'd be forced to run ./configure, and commit the results into CVS; our 64-bit build didn't work so well

* Everything must be written in C++ -- even stuff that's usually written using simple shell scripts ("makes everything easier to understand")

* On Windows, we had to use Visual Studio 5.0 -- couldn't use any parts of C++ not supported by that compiler

* Everything was written in-house -- including 4 networking libraries. Three of them by the same person.

The list goes on. *Hits the bottle

</comment><comment><USER61> Excel spreadsheet for version control

</comment><comment><USER62> 80 characters per line limit....ridiculous when we live in the age of cheap widescreen monitors.

<comment><USER63> I can understand that having a strict hard limit is pretty stupid - having to split a printf format string just makes grepping harder. But really, long lines do make code harder to read. 80 is the default width of basically all text editors, it just makes sense that if you are going to limit it, it should be 80.

Would you really ok a code review where every line (hell even one or two lines) took up 200+ chars?

</comment></comment><comment><USER41> In a Java environment, in late 2007, we began work on a new application. I was told not to use Spring and that the application should be developed in Struts 1.

Thank god I left after a year.

Going forward, when you interview, you should ask about development environment, version control, testing practices, etc. You should ask to talk with some of your future coworkers.

If an environment is toxic, riddled with politics, poor engineers and bad coding practices, it's admirable if you try to change things - but you probably won't succeed. You're better off leaving and finding a better place to work.

</comment><comment><USER64> <http://www.joelonsoftware.com/articles/fog0000000072.html>

</comment><comment><USER65> All business logic placed within stored procedures that others can modify.

All main application development by the technical director and no-one else.

</comment><comment><USER66> I was told not to use constants on the left hand side of an expression e.g., if("hello"==strVar) and was made to change it throughout my code. Needless to say I quit after making that change.

<comment><USER67> The alternative 'if(str=="hello")' is so much more common as to be a de facto standard, and if a shop decides to enshrine this common convention in their coding standards and enforce it, I don't see that as unreasonable. Certainly not something you should quit over.

<comment><USER3> It makes sense if you are using C. If you are using something like C#, compiler will throw an error (not warning) if you write

if(str = "hello")

See: [http://stackoverflow.com/questions/655657/0-variable-or- null...](http://stackoverflow.com/questions/655657/0-variable-or-null-obj-an- outdated-practice-in-c)

<comment><USER68> your C compiler will also throw an error on that if you're using -Wall -Werror. Which you are, right?

</comment></comment></comment></comment><comment><USER69> perl</comment>


SketchDeck Raises Half a Million for Its On-Demand Design Service - <AUTHOR> http://techcrunch.com/2015/02/04/sketchdeck-raises-half-a-million-for-its-on-demand-design-service/

<comment><USER2> I have used sketch desk several times and I find the service indispensable. The team, product, and experience are all world class.

</comment><comment><USER3> We use 99designs from time to time. I am looking at the sketchdeck site and I don't really understand how this is different.

<comment><USER4> Looks like they already have designers on standby, so you don't have to sort through submissions and all that.

<comment><USER3> How would you not? You still need to get something you like, which is always hard and subjective with design.

</comment></comment></comment><comment><USER5> Nice!

</comment><comment><USER6> Congrats!

<comment><AUTHOR> Thanks man :)

</comment></comment><comment><USER7> awesome</comment>