How do I know if I have the aptitude to do programming as a career? - <AUTHOR>

Hello All,
I am currently contemplating a career change. Well actually, it's not much of a career change since I've just been doing admin stuff after college. My education was in liberal art.
My question is how do I know if I have the aptitude to do programming as a career? Like where people actually will pay me money for writing code!?
I'm also thinking about going back to school to get a MSCS; but more importantly, I'm worried if I can even make the cut to be a programmer.
Any help would be greatly appreciated! Thanks HN! <comment><USER2> You should be programming in your spare time.

You should be well-aware that much of the knowledge that is necessary to start programming/learn to program is not locked up in labs on college campuses, but is actually freely accessible throughout the web...

If you really want to start, then start, there's nothing stopping you. You generally will be better at things you like to do (since you'll get more practice) -- and I think that will be the best indicator of whether you'll be good at it -- there's usually something very long if you love something (like programming) but are bad at it after months of doing it.

Really, what colleges are there to teach you (or force you to ingest, if you want to think about it that way), is the algorithmic, high-level side that can be applied no matter what language/framework/etc

</comment><comment><USER3> Like other people have said, try programming in your spare time. There are a lot of great sites lube codecademy and udacity that have great introductions into software development. I don't regret going to school for Computer Science,I learned a lot of theory and algorithms that would have taken a lot more time on my own, but I learned a lot about good software practices from researching on my own. The mythical man month and code complete are excellent software best practice books as well

</comment><comment><USER4> sudo apt-get install aptitude :-)

OT: I programmed as a hobby since I was 10. If you have never done that, it's a bit indicative of lack of interest in the subject if I may say. However, if you did, then you've all it takes. Interest and curiosity get you anywhere.</comment>


Hong Kong pro-democracy tycoon Jimmy Lai arrested - <AUTHOR> https://www.bbc.com/news/world-asia-china-53717843 <comment><USER2> Duplicate: [https://news.ycombinator.com/item?id=24105311](https://news.ycombinator.com/item?id=24105311)

</comment><comment><USER3> From Wikpedia [0]: Lai was born in Guangdong, China in December 1948. At the age of 12, he entered Hong Kong as a stowaway on a boat. Upon his arrival, Lai began work as a child-laborer in a garment factory for a wage of $8 per month. ... Net worth US$1.2 billion (2008)

What an incredible character. Arresting a man like that has to be one of the most straightforward own-goals that a nation can manage.

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

<comment><USER4> China is determined to run itself to the ground

</comment></comment><comment><USER5> It's all over for Hong Kong as it has been in the past - a bridge between east and west - a NYC of Asia.

I lived there for 4 years just after the GFC as the transition was slowly continuing to stronger Chinese rule.

My view is nothing new. My gut feeling take away was that China will want to run HK into the ground - as a middle finger to the west - and have the only strong pillars on the region to be Shanghai and Beijing.

<comment><USER6> Don't sleep on Shenzhen. I think China will look to starve HK by moving as much of the HK financial sector to the bay area.

I can't speak for what will happen wrt the international links that make HK what it is, but if China pulls it off they will have hardware, software and finance all in one place.

Imagine if NYC had a baby with SV...

<comment><USER7> > Imagine if NYC had a baby with SV...

 _shudders_

</comment></comment></comment><comment><USER8> This is clearly a signaling move for the wealthiest and most influential business leaders in Hong Kong who might be tempted to subvert Beijing's authority. If they can get the biggest and wealthiest pro-democracy tycoon, they can get anyone.

This is like when Putin arrested Mikhail Khodorkovsky in 2003. The Russian oligarchs fell into line shortly thereafter.

</comment><comment><USER9> NPR Planet Money had an episode about Hong Kong and Jimmy Lai a year ago. It was a good listen, I learned a lot.

[https://www.npr.org/2019/07/19/743480237/episode-928-hong- ko...](https://www.npr.org/2019/07/19/743480237/episode-928-hong-kong)

<comment><USER10> I would second this, really interesting episode. He was not afraid of getting arrested he said, I still cannot completely understand a man like him, I wish more people had those guts.

</comment></comment><comment><USER11> I understand what they're getting at, I think, but "pro-democracy tycoon" has to be one of the funniest oxymorons I've seen in serious print (at least on its face).

<comment><USER12> Why is it an oxymoron?

<comment><USER13> In the US at least, many (most?) tycoons are involved with lobbying of the sort that destroys the function of democracy, even though they leave the form.

<comment><USER14> Being rich and successful isn't inherently evil, nor anti-democratic. Weak and corrupt governments who bend themselves to please evil people who are also rich, however, are very much a threat to democracy.

<comment><USER15> Agreed, but using the word "evil" in a political context tends to suck all of the nuance out of the room.

The rich who attempt to bend the government are certainly ALSO a threat to the democracy.</comment></comment></comment></comment></comment>


I'm an academic, and I feel underpaid and over-monitored - <AUTHOR> https://www.theguardian.com/higher-education-network/2018/jul/20/im-an-academic-and-i-feel-underpaid-and-over-monitored <comment><USER2> The author should just quit their academic role and become a bureaucrat. If you can't beat them, join them. It's one of the paradoxes of our society; those who have the most power to change things are also the least interested in doing so.</comment>


Free EBook from Apress - Windows8/JS/HTML5 - today only. - <AUTHOR> http://www.apress.com/events/metrorevealed

<comment><AUTHOR> Warning - their server is not handling the traffic very well when it comes to the very end of the checkout process (submitting the order)... it failed twice for me.

<comment><USER2> I had lots of problems too. Even after getting my confirmation number on my second try, I saw no sign of the ebook, and when I tried to login the site didn't have me registered.

The fourth try finally worked, and the confirmation page was slightly different from the second one (which looked like it had gone through but hadn't.)

On the working confirmation, my order number was a link and there was another link to print my confirmation.

I wish the checkout page was not "single page" with tons of AJAX. I felt like I wasn't making progress that way.

It's more of a long article than a book. Only one sample app is explored. Under "Source Code / Downloads" here, you can find the source used, which is probably about as good as the book itself for at least learn-by-example-source coders like myself: <http://www.apress.com/9781430244882>

The link to download the source in the book is wrong and so is the table of contents pagination in the PDF version at least.

</comment></comment><comment><USER3> MET12</comment>


GitHub drops "master" and "slave" terms amidst BLM backlash - <AUTHOR> https://decrypt.co/32594/github-drops-master-and-slave-terms-amidst-blm-backlash-juneteenth <comment><USER2> When has GitHub used the term "slave"?

(Not a rhetorical question: there are many aspects of GitHub that I am not familiar with.)

</comment><comment><USER3> now I'm waiting for dropping the word "master" from things like:

\- Master Chef

\- Chessmaster

\- Master's Degree

\- ATP Masters

\- MasterClass

and so on...this is so ridiculous.

<comment><USER4> Don't forget MasterCard.

BTW I personally find Visa offensive to immigrants.</comment></comment>


Ballmer: An iPad Killer is Job One - <AUTHOR> http://www.pcpro.co.uk/news/359887/ballmer-urgently-wants-to-launch-ipad-killer

<comment><USER2> If I have to install ant-virus software on a tablet, then they have failed. They really need to figure out a way to take some of the current lessons from iOS and Android to heart and build something that is dead simple, integrates well with Exchange, easily managed by IT Admins, and doesn't require maintenance.

<comment><USER3> Either MS makes a tablet that's actually cool, or they make a tablet I can install Ubuntu on, or I have another chance to laugh at MS. Any way you slice it, I win!

EDIT: Microsoft has XBox. They should be able to _murder_ Apple with their resources and an installed base like that. They could make sure that putting Apple and "Digital Hub" in the same sentence implies a joke. The fact that this isn't imminent is a sign of massive internal disfunction.

<comment><USER2> I would submit to you that the installed base of iTunes is a lot higher than XBox. I believe the days of thinking of Apple as the little guy are just about over.

<comment><USER3> My point is that XBox has _for a freakin long time_ been occupying the perfect real estate for the "digital hub!" If Microsoft could execute on decent "me too" offerings, they should have been able to _murder_ Apple from that position. They had the fortified high ground with the heavy artillery and troops sitting on it, and they still let Apple surround and bypass them. C'mon! Zune + Plays for Sure. Vista. Kin.

Microsoft Home Server is a potential gold mine! Inkskein/Courier could have revolutionized personal computing in deeper ways than iPad. Singularity could have leapfrogged OS X, leaving it hopelessly in the dust.

Clearly, Microsoft has been dysfunctional and could not execute.

<comment><USER2> Sony had a better chance than Microsoft being in that space longer and also being a content producer. If Sony had come up with an iTunes service at the same time as Apple and incorporated it into the Walkman, Sony TVs, Sony / Erickson cellphones, and the PS/2 then Apple would have had some real competition. But, it didn't happen much like Barnes & Noble didn't build a competitor to Amazon until it was too late.

Microsoft's biggest problem is that the Windows franchise was not directly translatable into MP3 players or phones. This made their normal "me-too" strategy very hard. Also, all of the lock-in that Microsoft got from their Windows line was actually in Apple's favor with the iTunes ecosystem. "Me too" doesn't work if the switching cost is too high.

Microsoft Home Server is great for geeks and knowledgable users, but it is too expensive (PC cost / maintenance cost) for normal people. I believe Courier would have been a great product, but it, by design, would not have had the depth of ecosystem that the iPad has. It would have been an amazing device for business though.

<comment><USER3> In a nutshell: Apple has been walking all over competitors with tremendous positional and legacy advantages because only they truly understood end-to-end user experience.

</comment></comment></comment></comment></comment></comment><comment><USER4> I was going to supply quotes here from the article, quotes that Ballmer made demonstrating his complete lack of competency in understanding the playing field, but then I realized that was all of them.

</comment><comment><USER5> He should avoid using words like "urgently". Causes me to expect they're going to rush it out prematurely and embarass themselves.

<comment><USER6> > they're going to rush it out prematurely and embarass themselves.

like they did with Vista?

Seriously: they have ample capacity to embarrass themselves even without rushing things.

</comment></comment><comment><USER7> Hopefully they will let a small team of specialists handle this challenge instead of throwing a lot of people and money at the problem.

<comment><USER2> They had that (multiple times). Their obsession with putting "Windows" everywhere is killing good things. I (not a Microsoft fan) thought the Courier would have been a great product in the $300 - $500 price range. I could easily see people buying it and ditching their daytimes.

</comment></comment><comment><USER8> Like the iPod killer? Or the iPhone killer?

<comment><USER9> If you start by marketing your product as an "X-Killer", you've just shot yourself in the foot.

<comment><USER10> Exactly, because if you just injure instead of kill, you've failed.

</comment></comment></comment><comment><USER6> Well... According to this

[http://tech.fortune.cnn.com/2010/07/30/steve-ballmer-on- the-...](http://tech.fortune.cnn.com/2010/07/30/steve-ballmer-on-the-ipad-the- transcript/)

theirs will even print. I can't imagine how Apple will be able to compete with something so revolutionary.

<comment><USER3> Isn't there an app for printing?

<comment><USER11> There are actually dozens of apps for that. Here's a few:

ActivePrint <http://prmac.com/release-id-13473.htm>

iPrintApp <http://www.pcmag.com/article2/0,2817,2351954,00.asp>

Air Sharing Pro <http://www.pcmag.com/article2/0,2817,2351933,00.asp>

HP iPrint Photo <http://www.pcmag.com/article2/0,2817,2351934,00.asp>

Canon Easy Photo-Print <http://www.dpreview.com/news/0910/09101602canonprintapp.asp>

</comment></comment></comment><comment><USER12> When was the last time something described as a "X killer" actually killed, or took significant market share away from, X?

<comment><USER11> When Adobe InDesign was released (1999), it was soon called the Quark XPress killer. <http://www.macworld.com/article/21336/2001/02/indesign.html>

A couple of years later, most print shops had switched to InDesign.

(EDIT: The print shops I was working with had all switched to InDesign by 2002. I'm sure that it took longer in other parts of the country. Be that as it may, it has definitely become the layout package of choice.)

<comment><USER13> It took a hell of a lot more than a couple of years.

</comment></comment></comment><comment><USER14> I'd imagine a windows tablet would come mostly at the expense of an android tablet market share.

<comment><USER15> I think you accidentally a word.

<comment><USER3> "This sentence no verb!" --Douglas Hofstadter

</comment></comment></comment><comment><USER16> It is unclear whether Microsoft's future tablet will be successful or not, but most of Ballmer's comments seem fairly reasonable and he never uses the phrase "iPad killer"

</comment><comment><USER17> The fact that Ballmer is talking Windows 7 makes the whole idea doomed to fail.

Why not Windows Mobile 7 (or whatever they're calling it these days)?

I have never been a fan of Windows Mobile-- each WM phone I had prior to the iPhone, I wanted to smash into the ground.

Windows Mobile 7, however, actually looks pretty nice, and it seems like a fresh UI (even though it is Zune-like). It's not my taste in design, but it seems much more well suited to a slate interface than Windows 7.

</comment><comment><USER18> "Ballmer: Catching Up Is Real Hard"

FTFY. :)

<comment><USER4> Quote from the same guy who presided over the nixing the Courier. <http://en.wikipedia.org/wiki/Microsoft_Courier>

__sigh __Has _anything_ come out under this guy that wasn't always going to anyways by sheer force of market inertia?

</comment></comment><comment><USER19> Oh man. There's nothing wrong with a fast-follower strategy, but the basic requirements are to (1) be fast, and (2) understand the thing you're trying to follow. SteveB is missing the boat on both here.

</comment><comment><USER20> Hey Steve, what's Job Two?

<comment><USER11> "Job one" is singular, "Steve Jobs" is plural :)

</comment></comment><comment><USER21> Why not innovate instead? Or go after Apple where Apple is weak? AppleTV is a great target. Microsoft could own the home theater PC market a lot easier than they could catch iPad.

<comment><USER22> I haven't used it, but I've heard that Windows Home Server is actually pretty good. Not particularly well publicized, though.

[http://www.microsoft.com/windows/products/winfamily/windowsh...](http://www.microsoft.com/windows/products/winfamily/windowshomeserver/default.mspx)

</comment></comment><comment><USER23> Anyone else ironically hoping MS creates a better iPad just for the opportunity to install Linux on it?

</comment><comment><USER24> Microsoft "innovation": Three rotten product generations followed by an Apple clone.

</comment><comment><USER25> hahahahahahahahahahahahaha

(Sorry but I couldn't resist)</comment>


Show HN: Fast, Local, Linked Notes - <AUTHOR> https://jottt.xyz <comment><AUTHOR> Hey.

I wanted to share a project I've been working on. About a week ago I started building a todo-list app, and it got a bit out of hand. I ended up with note- taking tool with linked notes, save & sync, and shareable note title suggestions, etc.

I haven't implemented sign up yet, so technically it's in 'closed beta', but subscribe here ([https://www.producthunt.com/upcoming/jott](https://www.producthunt.com/upcoming/jott)) and I will give access as soon as I can (usually about an hour or two, but times vary depending on how your time zone overlaps with mine.)

</comment><comment><USER2> My 2 Ct. It would be nice to have some information and screenshots of your project on the website.

The headline got me to click the link: * Local (yeah) * Linked Notes (nice, I'd love to link my lists and memos somehow)

But the website only shows a submit form, why — thought it was local?

<comment><AUTHOR> Yeah, I am currently working on building a landing page with info & screenshots - for now this ([https://www.producthunt.com/upcoming/jott](https://www.producthunt.com/upcoming/jott)) page is acting as the landing page.

And the notes are local - the submit form & sign-in is to enable you to backup your notes and sync them between devices.

Although you bring up a good point - maybe I should only require sign-in when a user wants to use save & sync.

<comment><USER2> >Although you bring up a good point - maybe I should only require sign-in when a user wants to use save & sync.

Thanks, yes sounds like a good approach and might even bring more people onboard who just wanna try it out without needing to sign-up.

<comment><AUTHOR> I just now implemented the change. Thanks for the feedback!</comment></comment></comment></comment>


https://photos.app.goo.gl/fCnqs3RkoefuJZEF6 - <AUTHOR> https://photos.google.com/photo/AF1QipPThQ_hkocDXtLMVhMq4k8gOVTtX_h0Uy5P86vu <comment><AUTHOR> [https://photos.app.goo.gl/fCnqs3RkoefuJZEF6](https://photos.app.goo.gl/fCnqs3RkoefuJZEF6) Look at that. Microsoft is trying to use a dark pattern to get the user to switch back to edge. Then I get a popup on a ms knowledge base article about edge.

This is annoying.

<comment><USER2> More reason never to use win10, make the switch today, free yourself, install linux :)

</comment></comment><comment><USER3> This link requires a Google Account. I've no idea what that is.

</comment><comment><USER4> This link leads to a 404</comment>


Shortcuts JS has a new home - <AUTHOR> https://shortcuts.fun <comment><AUTHOR> Hey HN!

I'm happy to announce that Shortcuts JS finally has a proper home! The only real source of information on the library before now was the README on GitHub, so it's nice to have a better looking place to learn more about the library.

I've also spent a bit of time building a Playground into the site, so you can now play around with Shortcuts JS right in your browser! Downloading a Shortcut from the Playground doesn't currently work on iOS. I'll be adding support for that in the near future.

Any feedback on the site would be greatly appreciated!

As you'll see, we're about 10% of the way through implementing all of Apple's built-in actions into Shortcuts JS. If you'd like to help us get just a bit closer to 100% then I'd love to have you as a contributor! Adding an action only takes a few minutes and I'm more than happy to help you get started. Plus, you'll get pride-of-place in the Contributors section!

Any questions let me know!</comment>


Implementing your own recommender systems in Python - <AUTHOR> http://online.cambridgecoding.com/notebooks/eWReNYcAfB/implementing-your-own-recommender-systems-in-python-2 <comment><USER2> Google cache link: [http://webcache.googleusercontent.com/search?q=cache:1qK6xyT...](http://webcache.googleusercontent.com/search?q=cache:1qK6xyThZ- AJ:online.cambridgecoding.com/notebooks/eWReNYcAfB/implementing-your-own- recommender-systems-in-python-2+&cd=1&hl=en&ct=clnk&gl=us)

Ipython notebook used: [https://s3-eu- west-1.amazonaws.com/com.cambridgecoding.stude...](https://s3-eu- west-1.amazonaws.com/com.cambridgecoding.students/eWReNYcAfB/notebooks/001044cea50d2013af45306b76b420e1/notebook.ipynb)

</comment><comment><USER3> How cool would it be to have a recommendation system for music that follows _mood_? That could be trained on actual music not by me saying "I listen to songs x,y,z when sad, a1,b1,c2 when it's sunny and i'm feeling good etc". If this will ever exist it would probably increase my hedonic index 10 fold

<comment><USER4> There's certainly a lot of research trying to incorporate things like this into recommendations, but it never really made it to mature products (apart from some experiments on last.fm, 8tracks, etc.)

Spotify tries to accommodate this by offering curated playlists based on moods, but knowing a user's mood to make that type of recommendations is hard. (it's a bit intrusive for a music streaming service to ask you how you feel every time you start it up)

<comment><USER5> If I could start a service, and trust a skip to indicate "no, you got it wrong, try something closer to the last track I didn't skip", it could often narrow in fairly quickly. Perhaps offer a few more alternatives for skipping that'd indicate reason. E.g. "want something more up-tempo/downtempo/more cheerful/sadder".

<comment><USER6> Assuming you know what you want of course. But the recommender system could have a mode where it learns which taste you like based on time, number of unread mails in your inbox, skipped songs and moon cycle. :)

<comment><USER5> But the point is you don't need to know what you want. You only need to think you do. You can let the system adjust what the buttons means too, based on your subsequent behaviour.

</comment></comment></comment></comment></comment><comment><USER7> A very basic test of a recommendation system is the following scenario:

You're a fan of a local band, listen to them a lot. This band is sampled, and actually praised, by a Korean rap artist. Suddenly thousands of Koreans are listening to it. Will the recommender system now recommend Korean rap to you?

Most recommender systems will.

<comment><USER8> So hypothetically speaking, gangnam style shouln't show up in an English speaking person's list?

<comment><USER9> The other direction. Fans of K-pop shouldn't start getting Taylor Swift recommendations when a K-pop single goes viral.

And people that like lots of viral songs _should_ get Gangnam Style recommended.

</comment></comment></comment><comment><USER10> On vector similarity, I'd recommend a custom variant of the uncentered Pearson correlation as it better accounts for a balance between discreet and continuous values with vectors that might vary in length.

If you want to get real fancy you can use variants in combination with the uncentered Pearson correlation including variants of KL distance to RV distance calculations if you can fit your such that those become effective.

</comment><comment><AUTHOR> It's back for now until the next completely unplanned "hacker news DoS" :-o

</comment><comment><USER11> good stuff! nice high level overview, would love some more in depth follow ups as well. maybe a discussion about how the different methods scale on huge user-item matrices. keep it up

</comment><comment><USER12> dang, this looks like it might be good but it seems to be down</comment>


How I Lost 17,000 GitHub Auth Tokens in One Night - <AUTHOR> https://www.schneems.com/2017/08/30/how-i-lost-17000-github-auth-tokens-in-one-night/ <comment><USER2> If you'd ran your code offline at the start you'd have picked up on this straight away!</comment>


Skydock: Service discovery for Docker via DNS - <AUTHOR> https://www.youtube.com/watch?v=Nw42q1ofrV0

<comment><USER2> FYI here is the github repo with a detailed readme.

[https://github.com/crosbymichael/skydock](https://github.com/crosbymichael/skydock)</comment>


27 Ruby Gems I use in almost every project - <AUTHOR> https://dev.to/rob__race/27-gems-i-use-in-almost-every-project <comment><USER2> > LoDash is very helpful in adding enumerable functions to javascript and in > most cases of Rails applications, CoffeeScript.

I'm a bit confused by this line, but I'm not familiar with lodash. Could somebody explain what is an enumerable function in Javascript? The lodash docs didn't help.

<comment><USER3> I believe the author is referencing Ruby's Enumerable class ([https://ruby- doc.org/core-2.4.1/Enumerable.html](https://ruby- doc.org/core-2.4.1/Enumerable.html)), and getting those helpful functions in JS.</comment></comment>


A Life that Added Up to Something: Paul Erdos (1996) - <AUTHOR> http://www.math.ohio-state.edu/~nevai/ERDOS/erdos_washington_post.html

<comment><USER2> Paul Erdős was quite a character. Read _The Man Who Loved Only Numbers_ for some fun stories about him.

</comment><comment><USER3> Apart from his Other idiosyncratic elements 'died' and 'left' of Erdős vocabulary I found the following particularly amusing:

# children were referred to as "epsilons" (because in mathematics, particularly calculus, an arbitrarily small positive quantity is commonly denoted ε);

# to give a mathematical lecture was "to preach" and

# to give an oral exam to a student was "to torture" him/her.

<comment><USER4> The second two are quite common in Hungarian (i.e. any lecture given from a pedestal/"cathedra").

</comment></comment><comment> patrickg-zill Funny anecdote from Sun bigwig: using your Erdos number to decide who goes first in line...

[http://blogs.sun.com/stern/entry/seating_algorithms_and_why_...](http://blogs.sun.com/stern/entry/seating_algorithms_and_why_whit)

<comment><USER5> Well my Erdos number is 5. Can I get a few more HN karma points for it :)

</comment></comment><comment><USER6> A nice read. I love reading about maths, just not doing it.

<comment><USER3> I read "The Man Who Knew Infinity" - Ramanujan's biography and it was fantastic read.

[http://www.amazon.com/Man-Who-Knew-Infinity- Ramanujan/dp/068...](http://www.amazon.com/Man-Who-Knew-Infinity- Ramanujan/dp/0684192594) Do check out recommendations by Amazon, seems like a great set of books.

<comment><USER5> This was a great book. The story about the taxi cab number 1729 was staggering to me in what it implied about how Ramanujan's mind worked. It was also profoundly sad that because the little formal exposure he had was from a book where there were no proofs he thought that one merely stated results. Many PhDs have since been awarded for proofs of some of these results.

</comment></comment></comment><comment><USER7> For his epitaph he suggested, "I've finally stopped getting dumber."

<comment><USER8> Végre nem butulok tovább. [Finally I am becoming stupider no more.]

</comment></comment><comment><USER5> Hank Aaron has an Erdos number of 1

<comment><USER9> No, he hasn't. Quoting WikiPedia:

        It is jokingly said that Baseball Hall of Famer
        Hank Aaron has an Erdős number of 1 because they
        both autographed the same baseball when Emory
        University awarded them honorary degrees on the
        same day. Erdős numbers have also been humorously
        assigned to an infant, a horse, and several actors.

The fundamental principle underlying the Erdos number is collaboration. If you didn't work together, you don't get the credit.

Color me humorless if you like, but I would've thought hackers would care about being accurate and precise.

<comment><USER5> yes it is jokingly said. The book cited above (The man who knew only numbers") is a great read. It has a picture of Erdos with Aaron receiving honorary degrees.

I studied graph theory for a year at MSU with Edgar Palmer in 1981. At the time the proof of the four color conjecture, which was very controversial because it used a computer program (egads!!) was making the rounds. Palmer related many interesting stories about Erdos and also had us work on some of the problems for which Erdos had offered rewards.

</comment></comment></comment><comment><USER10> I love hacker news.</comment>


GitHub Super Linter: one linter to rule them all - <AUTHOR> https://github.blog/2020-06-18-introducing-github-super-linter-one-linter-to-rule-them-all/ <comment><USER2> Great! Now do it for code formatters!

After using Prettier for a few years I'm firmly in the camp of mandatory/enforced code formatters. As long as it's a half decent formatter like Prettier I believe my personal opinions on the specific formatting choices are much less important than essentially never having to think about formatting again, in particular having to ask people to fix formatting in code reviews (or fix it myself).

I also love just banging out code, saving, and having my editor clean up the formatting for me.

<comment><USER3> One of the hills I am willing to die on is auto-formatting. Code formatting is easily automated to an acceptable level, and people's personal preferences are subjective.

I like to solve interesting problems, and concentrate on crafting high quality software. Manual code formatting contributes to neither of these disciplines. Code formatting is BORING robot work, not human work. Total pointless drudgery. Toiling away because you like your bracket with a different spacing is IDIOTIC. Run the formatter and move on.

<comment><USER4> Normally I agree with treating code as a means to an end rather than an end to itself but I take a certain enjoyment in crafting in some way aesthetically pleasing code as well. I even find that if the code is "ugly" that there frequently might be a more eloquent and objectively better way of doing things. And a little time hand formatting I think is worth it if you're maximizing understandability and readability.

Not arguing about style is nice, but having to resort to this brutalist architecture style of code formatting doesn't seem great to me. "Its just holding people, who CARES what the building looks like!"

<comment><USER5> There are two kind of painting. You can paint a wall/a building, or you can paint Mona Lisa.

This is the same for programming. Each dev have their own taste in term of code style and code formatting preferences. I was an early employee in a startup, and at some point I was able to tell who wrote a chunk of code just from the code style, it was fun :) but as company grown, and team got bigger, it got more "professional", now we have prettier which erases a big part of our code personality. If you believe like me that coders are artists you might find that a bit sad, but the truth is that most Enterprise software building is wall painting, and art doesn't have its place there. That doesn't prevent us from painting Mona Lisa at home though :)

<comment><USER6> I like the point in general, but I will say there are times when idiosyncratic formatting can really help understanding "this particular bit of code". Often it has to do with aligning values so that they are easier to read; if a code formatter was smart enough to at least understand the signal the programmer is sending, and maintain (or even improve!) that kind of formatter, it would be the best of all worlds.

One simple example is when you're parsing text and you have a long list of simple one-line if statements. I personally think it's wasteful and harder to read that block of code if you impose curly braces and new lines on that list of conditionals. This kind of formatting convention has been around for at least 40 years, and it makes the code more readable. I have yet to see an auto-formatter that doesn't turn that kind of code section into an unreadable mess.

<comment><USER7> Or key value lists where the keys have slightly different lengths.

</comment></comment></comment></comment></comment></comment><comment><USER8> A problem I can see with this super linter is that it seems be written exclusively for GitHub Actions; there's no local install option. (I didn't read the code, maybe you can use lib/linter.sh directly, but it's certainly not directly supported.) So contributors have to rely on the CI feedback loop to see if their changes are compliant (insert fencing comic here)... Or more realistically, still use whatever linters they've been using so far, but now you have to maintain linter configs in two places.

I get why it's probably not ideal as a local tool, and integration with Status API is nice and all, but I personally prefer to see devs linting their code before pushing for review.

Correction: it can run locally in Docker, as pointed out below: [https://github.com/github/super- linter/blob/master/docs/run-...](https://github.com/github/super- linter/blob/master/docs/run-linter-locally.md)

<comment><USER9> Hi, there is a local run option with instructions here: [https://github.com/github/super- linter/blob/master/docs/run-...](https://github.com/github/super- linter/blob/master/docs/run-linter-locally.md)

<comment><USER10> It's kind of odd that GitHub is asking people to pull an image from a Docker account that most people won't recognize (admiralawkbar/super-linter), as opposed to an official GitHub one.

<comment><USER11> What was Admiral Ackbar's famous quote?

<comment><USER12> "ask yourself if that answer doesn't make you look just a bit like a dewback's cloaca"

</comment></comment></comment></comment></comment><comment><USER13> So, this looks interesting. Rather than a real new linter, Github is proposing a tool that runs against a number of common linting standards with a single shared standard library.

Perhaps it would have been better pitched a Lint-runner for CI jobs rather than a real linter.

<comment><USER9> Never thought of that! That does seem more accurate and descriptive.

</comment></comment><comment><USER14> Is anyone else uncomfortable with Github/MS owning more and more of your tool chain? Maybe my lock-in radar is faulty, but the more this happens, the more scared I get.

<comment><USER15> It's MIT License. You're free to fork.

<comment><USER14> Yeah but only MS/GH have the resources to maintain a viable project here. Little old you and me aren't really going to reasonably fork something and have the time to maintain it.

<comment><USER16> Hm, I wouldn't say so for the superlinter specifically. If you actually look at the source, it doesn't seem particularly hard to maintain.

</comment></comment></comment></comment><comment><USER17> There seems to be a universal law of software systems that if small, self- contained subsystems exist - someone will glom them all together into an Uber- system, and vice versa. It's inescapable.

<comment><USER18> In business they call it bundling and unbundling:

> There are only two ways to make money in business: One is to bundle; the > other is to unbundle. [1]

[1]: [https://twitter.com/eriktorenberg/status/1214671238552940544](https://twitter.com/eriktorenberg/status/1214671238552940544)

</comment></comment><comment><USER19> One step closer to Linting as a Service. That'll be next, along with Compilation/Build Systems as a Service. Or more likely part of the whole IDE moving to the cloud.

The pain being solved here is that setting up the right development environment is hard, especially for those still learning to program. Many would be much more productive if we skip this step.

Another prediction: Once the development environment moves to the cloud, it will be tied directly to the deployment to a specific platform, such as Azure if this is offered by GitHub. Then Amazon and Google will have to build their own IDEs in the cloud to compete. We'll no longer be developing locally but in the browser, and it will cost a lot more.

<comment><USER20> I fully agree. The "I" in IDE (Integrated) has not aged well, just look at how many parts of the software development cycle are outside of the IDE. It's time to really integrate/bundle everything in a way that makes sense.

Things I want in my IDE:

\- monitoring/alerting (how many times is this method executed, how long does it take, how many errors, etc)

\- discussions as in Google Docs on code fragments, rather than "comments" that are part of the git history (comments are an orthogonal concern from checked in code)

\- visual representation of my code base

\- ultra fast automated test that cover only what I recently changed

\- a documentation system that makes sense

<comment><USER19> > The "I" in IDE (Integrated) has not aged well

This such a good observation. I will be using this quote in the future.

I've seen what integration of the development environment looks like inside a big company (Facebook) and it's just amazing how seamless everything can be when all your tools are built with an awareness of each other. I think we'll see that soon outside these big companies.

</comment></comment></comment><comment><USER21> Yay for (some) Perl support!

The Perl validation seems to be restricted to "compile with warnings", despite "perlcritic" being now almost 15 years old, predating both some other linters' and even some other languages' very existence.

I'll try to see how feasible it'd be to add it as a ("the"?) Perl linter to be used as using just the compilation step to infer everything's fine doesn't really satisfy the role a linter is meant to have.

<comment><USER22> Also note that "perl -c" can't be used securely against untrusted code:

      $ echo 'BEGIN{`cowsay pwned > /dev/tty`}' > test.pm
      $ perl -Mstrict -cw test.pm
       _______
      < pwned >
       </comment></comment><comment>-
              \   ^__^
               \  (oo)\_______
                  (__)\       )\/\
                      ||----w |
                      ||     ||
      test.pm syntax OK

<comment><USER23> Also, it looks like the perl linter only triggers against .pl files and not .pm files

</comment></comment><comment><USER24> Seems like this is the equivalent to GitLab's Code Quality CI template [1]? Which is supposedly built on Code Climate [2].

[1] [https://docs.gitlab.com/ee/user/project/merge_requests/code_...](https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html)

[2] [https://codeclimate.com/](https://codeclimate.com/)

<comment><USER25> We're in the process of stripping out Code Climate at work. Since it's difficult to run locally, the whole "let CI run to see if your code lints" isn't a great experience. And when first running prettier on our codebase, it stated something like 8 days to "fix" it.

Just a poor experience all around.

GitHub's approach here seems much more sane.

<comment><USER26> They don't do the same thing

</comment></comment></comment><comment><USER27> What's very interesting in the list here: [https://github.com/github/super- linter/#supported-linters](https://github.com/github/super-linter/#supported- linters)

Java is the only major language without any sane default coding standard (no, google-java-format is google-specific, outdated, not up-to-date with recent versions and not maintained by community). It's a pity really.

<comment><USER28> I wonder why they went with Standard for JavaScript and TypeScript, instead of Prettier which is far more popular now.

<comment><USER29> As others have stated, prettier is a formatted not a linter. I do however agree that Standard is a weird choice and in my experience is far from an actual "standard". IMO the Airbnb style is excellent and would have been a better choice here. It's also available as an ESlint plugin. Hopefully something like this can be configured on the GH Action in the future, allowing for a choice between available presets.

<comment><USER9> Sounds like there is some consensus around switching out Standard. Feel free to open up an issue in the repo and we can discuss and move forward there if you like.

</comment></comment></comment></comment><comment> globular-toast > Setting up a new repository with all the right linters for the different > types of code can be time consuming and tedious.

Is it? In my company I maintain a set of exemplars for all of our commonly used repository types. When someone wants to make a new one they just copy and paste stuff from one of the exemplars.

Over the years I've come to value "white box" code re-use over "black box" re- use. In my experience many projects will outgrow their tools and need custom tooling, so it makes sense to keep the black boxes tiny and copy over large tooling in a white box fashion. For example, what if I want to change the Python linter for Pylint to flake8? I'll need a separate fork of superlinter or something. I'd prefer to just edit the tooling that is build in to my project.

<comment><USER30> So basically you've done the same as super linter at your company. But now, nobody else has to go through the pain of setting all of the exemplars up, because you get nice defaults, everything included for free from super linter.

</comment></comment><comment><USER31> What I'm missing is a really good linter and auto-formatter for PostgreSQL or just standard SQL. Haven't found something that seems well established and well made.

<comment><USER32> I was looking for one recently and was also surprised not to find anything really. I thought there'd for sure be one already packaged for `pre-commit`.

</comment></comment><comment><USER33> > The rule set for Ruby and Rails are pulled from the Ruby gem: rubocop-github > and follow the same rules and versioning we use on GitHub.com.

Anyone know how this compares with [https://relaxed.ruby.style](https://relaxed.ruby.style) ? The default rubocop is very angry about meaningless shit, curious where github falls on that spectrum.

</comment><comment><USER34> I think this is great.

I use SwiftLint for my code (Swift, not supported in SuperLinter, and I don't expect it to be).

[https://littlegreenviper.com/miscellany/swiftwater/swiftlint...](https://littlegreenviper.com/miscellany/swiftwater/swiftlint/)

I am real big on code quality. LINT is not a silver bullet, but every little bit helps. I also use things like -wall (or the equivalent, thereof, in Swift), and heavy-duty code commenting.

[https://medium.com/chrismarshallny/leaving-a- legacy-1c2ddb0c...](https://medium.com/chrismarshallny/leaving-a- legacy-1c2ddb0c8014)

</comment><comment><USER35> Am I the only one that dislikes linting?

Btw, you don't have to respond with the talking points I've heard all my life on why it's supposedly great, I've obviously heard them and think they're bogus.

I just find it strange that I'm the only one.

<comment><USER24> What do you dislike about bugs being highlighted as you type, rather than first having to run your code?

<comment><USER35> This is just me btw, don't take offense:

Because some things are better expressed in different rules.

That's why some syntax is optional in the first place, that's the reason it was made that way. The flexibility is a very intentional feature. It wasn't an accident.

Maybe you want multiple spaces to vertically align code in a complex set of logic. Maybe you want to express things on multiple lines to break them up. Maybe you have deep nesting so you want to go from 4 spaces to 2. Maybe you want no braces in a single line if statement except in certain cases. This could go for pages. Poof! All gone. You can't do any of it anymore.

Not following optional syntax like having a space after a comma or a space before a parenthesis is not a software bug. It's a waste of time. The compiler doesn't care and I don't either.

Instead it becomes a literal Blocking Issue most of the time. So instead of working on the actual blocking issues of the code base, you spend time doing "you did this here because of some context I don't understand and I'm not allowing it" You can't commit your code without conforming to it.

Also because linters are dumb. They "spot" things that are perfectly fine as supposed bugs (because they don't actually know types or logic, they're just dumb syntax checkers) and you have to work around them to satiate them with the possibility of introducing new bugs to prevent some tripwire system from false positives.

Compiler writers and language designers are the only people I've found who agree with me.

It's fine for protecting against profound levels of incompetence but I don't do that and you probably don't either.

<comment><USER24> So are you saying sometimes you _want_ to initialise a variable without ever doing anything with it afterwards? That that's not the result of a typo down in your code in the vast majority of cases?

I mean, I'll be the first to agree that blocking your development in the heat of it over some stylistic issue like quote styles is counter-productive, but if those rules are turned off and the rest help you catch actual bugs (and it's hard to argue that it does not), then that's surely a plus?

(Also, why wouldn't linters know types?)

<comment><USER35> It hasn't been my experience. I have had to deal with linters probably about 15,000 or so hours of my work life (luckily that's only about a third). It's been probably between 99.4% and 99.8% just acrobatic dog tricks to satisfy the linter.

It's not like I'm some grumpy malcontent that hasn't given it a go.

If you want to use it go ahead, I just thought I'd be standing in a larger crowd

<comment><USER24> Could it be that the problem with the linters you've experienced was that they were just configured far too strictly about things that don't matter too much, rather than linting itself being the problem?

I've got my linters set up pretty loosely, but the things that _are_ enabled have definitely helped me detect bugs earlier and quicker, and I really don't see how anyone could be against that.

<comment><USER35> well sure. There aren't bad tools just bad practitioners, sure. Certain tools give more affordance to certain use cases and maybe that's the issue.

For instance something where I am the culprit would be in PHP. I like PHP. I think it's a convenient and powerful language. Someone could take my linter arguments and weaponize them against PHP because it's too easy to do terrible things with it. Then I'd be the one on the other side of the argument all of a sudden, standing in defence of this easy to use language with handy powerful abstractions that can trash a system in a few keystrokes.

I think the difference is when we can come to an agreement that say, PHP is a very powerful tool in competent hands and a very dangerous tool for the foolish.

Going back to the topic at hand, I think the foolish side of linting is the dominant application I see in the wild. I used to use a barrage of proto- linting static analysis tools in my CVS scripts during the wild C days because pointer logic and memory management was notoriously tricky and gcc 2.x was notoriously forgiving. These tools could save days of debugging, really, yes, days.

If we can do that for say python it'd be great. Something saying "Oh I see you are doing a list[1:] in a tight loop, have you thought about collections.dequeue? it may be a better option" \- those things are things I do actually forget about and would find helpful.

It'd have to be voluntary though. Prod me a bit but then let me dig my own grave if it's a mistake. That's what the power of computing is also about.

<comment><USER24> Yep, I can definitely agree there.

That said, I'd argue against strict stylistic rules, not against linters in general. For example, the common Javascript linter (ESLint) has a setup wizard that allows you to choose whether you just want to check for bugs, or also enforce style conventions, and will enable a predefined set of rules depending on your choice. The bug-spotter is the one that's preselected. This is a very reasonable approach to me.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER36> Happy to see this development! There was an earlier attempt at universal static linter by the coala project [1], however, in the recent years the project was not keeping up with the underlying tools changing [2].

It's lovely somebody's picking up the torch here!

[1] [https://github.com/coala/coala](https://github.com/coala/coala)

[2] [https://github.com/coala/coala/graphs/contributors](https://github.com/coala/coala/graphs/contributors)

</comment><comment><USER37> The trend of putting developer tools behind a unified API is just awesome. Especially great for tool makers like us at Repl.it. We're investing a lot in this area too:

\- UPM: universal package manager [https://github.com/replit/upm](https://github.com/replit/upm)

\- Prybar: universal REPL interface for interpreters [https://github.com/replit/prybar](https://github.com/replit/prybar)

</comment><comment><USER38> I don't understand why there's any innovation around linters. To set them up as a PR hook, you literally just run a single linter command and check the status code. Why use something like this, or the absolutely horrible tool Codeclimate? Linting is a solved problem and easy to set up, and linting rules should be a per-TEAM decision to empower teams to solve their own problems.

<comment><USER9> Totally understand. I think the problem we are trying to solve here is integration with GitHub Actions as well being able to easily set up multiple linters for code ASR's with many languages. Hope that makes sense.

</comment></comment><comment><USER39> There are already quite a few projects that do this, and IMO do it better. I did a write up of a number of them on my blog - [https://blog.urth.org/2020/05/08/comparing-code-quality- meta...](https://blog.urth.org/2020/05/08/comparing-code-quality-meta-tools/)

</comment><comment><USER40> Visual Basic (6 at least) had none of these issues. It formatted your code as soon as you pressed <enter>. Im don't recall ever having control over the formatter, which was great because everyone's code ended up looking the same and there was nothing they could do about it.

</comment><comment><USER41> They should have explained what a "linter" is at the beginning of the post. [0]

[0]: [https://sourcelevel.io/blog/what-is-a-linter-and-why-your- te...](https://sourcelevel.io/blog/what-is-a-linter-and-why-your-team-should- use-it)

<comment><USER9> Considered that but thought the target audience might be familiar. I think your suggestion would have made it more accessible though to those who have not been around linters before.

</comment></comment><comment><USER42> This is great, but desperately needs a way to also fix these issues. And all functionality should run locally as well.

I imagine the latter is possible thanks to it being a docker image.

So far I've been using this script I built for similar purposes:

[https://gist.github.com/silviogutierrez/3dca60a6b5b8fe214052...](https://gist.github.com/silviogutierrez/3dca60a6b5b8fe214052b45cfe7c9b63)

Runs locally, and only on changed files against master. Fixes all my python, JS, yaml, terraform, etc. And you can run it against a single file too so I integrated it with vim to replace all my linters.

I really hope the GitHub initiative projects takes off as a standard API (à la language server) for linters and fixers. Seems every single IDE needs to reinvent a plugin for applying a specific linter.

<comment><USER9> I think there is an opportunity to integrate/add your gist to the super linter. Feel free to open an issue to get that started.

</comment></comment><comment><USER43> I like the way it improves the quality of deploys. Actually different approach but same aim is hidden behind Assistant extension to Visual Studio Code. I think both solutions are complementary to improve quality of team work. If you want to check Assistant out version 0.9.0 was just released two days ago: [https://marketplace.visualstudio.com/items?itemName=tomasz-s...](https://marketplace.visualstudio.com/items?itemName=tomasz- smykowski.assistant)

<comment><USER44> It would be nice if you said that it's your own extension...

<comment><USER43> My name is Tomasz Smykowski. Assistant is my design. And I am proud of it!

</comment></comment></comment><comment><USER45> Please someone design a cppfmt for c++ in the modern age.

If possible for C as well, to a less extent.

for clang-format, it can not even add blank lines between functions, and it can not indent "public, private, protect" inside class sanely, which are two very basic needs. The rest options are worse, however, but I hope something better than clang-format.

</comment><comment><USER46> Interesting, but ultimately the best linting tool is one that runs prior to commit. Especially if it can auto-fix.

</comment><comment><USER47> No C/C++ support?

<comment><USER48> You don't have linters for C/C++ as far as I know. I guess they could have included code-formatters too, like clang-format.

<comment><USER49> What about clang-tidy?

[http://clang.llvm.org/extra/clang-tidy/](http://clang.llvm.org/extra/clang- tidy/)

cpplint?

[https://github.com/cpplint/cpplint](https://github.com/cpplint/cpplint)

</comment></comment></comment><comment><USER50> Lots of comments seem to not know about SonarQube[1], which is a meta linter that has been existing for a while now.

[1] [https://www.sonarqube.org/](https://www.sonarqube.org/)

</comment><comment><USER51> This kind of reminds me of check-all-the-things:

[https://github.com/collab-qa/check-all-the- things/](https://github.com/collab-qa/check-all-the-things/)

</comment><comment><USER4> Reading through all these comments I see a lot of people saying "it stops the debate about style!"

It seems like people are having more of an issue with bike shedding than actual code formatting.

</comment><comment><USER52> Can we have something to beautify the code too? Like gofmt or shfmt?

<comment><USER8> golangci-lint already supports gofmt. You just need to turn it on.

<comment><USER52> shellcheck doesn't support formatting. I don't think some of the others support formatting either.

<comment><USER8> This is just a linter aggregator so someone has to write a formatter and popularize it first.

<comment><USER52> Yes. I was asking if they could consider adding a code formatter too.

</comment></comment></comment></comment></comment><comment><USER53> You got me motivated, ONE linter for everything.

Then I checked the code and see that this is a bash script which just runs the language-specific linters packaged in a Docker container :(.

</comment><comment><USER54> Argh I just worked on exactly this idea, as a tool for my company! What do people do when they see an idea they had/care about being implemented by someone else?

<comment><USER55> This is the nature of invention -- the current climate gives multiple people the same good idea around the same time. You could abandon and join, convince the other project to do the same, keep working on yours, stop working on yours and use theirs... depends on your goals.

</comment></comment><comment><USER56> I'd like to find a formatter that aligns opening and closing braces and parentheses vertically, if they span more than one line. Is there such a formatter?

</comment><comment><USER57> that's fine and all, but it sounds like I'd have to do a bit of manual work to get the same exact set of linting rules locally, so that I can lint before pushing.

CI linting/testing should be a final check, not a part of your iterative workflow. Any linting or testing you do in CI should have already been done locally by the dev.

</comment><comment><USER58> I wish this would also prevent creating PRs that don't pass the lint rules. It reduces churn on PR reviewers.

<comment><USER59> You could use something like [https://github.com/typicode/husky](https://github.com/typicode/husky) to prevent a push if the linter fails.

<comment><USER58> My (small) issue with git hooks, is that they need be installed everywhere for them to be 100% enforced. Works fine for small teams, but doesn't scale that well beyond that.

<comment><USER60> You make the hooks as part of the CI process. That's where something like husky can come in. We do this on my team.

If you're trying to enforce something locally you can definitely enforce it on CI automatically. Once people realized their PRs were failing due to linting issues they started checking them locally as well.

</comment></comment></comment></comment><comment><USER61> Why does this post have so many commenters conflating lint & friends with code formatting tools?

</comment><comment><USER62> I feel like this is just softening us up for the inevitable vscode (online edition)

</comment><comment><USER63> Does the linter check all or only newly pushed code? Is this configurable at all?

<comment><USER9> Checks all by default but you can set an env variable in the config to only check new code.

</comment></comment><comment><USER64> Can someone recommend a Java alternative to ESLint for JS eco-system?

<comment><USER65> Used `checkstyle` 4 years ago to improve the quality of code. Has neat XML based rules and good IDE support. See if it fits your use-case.

</comment></comment><comment><USER66> GitHub got a lot of fire in their ... after acquisition. I was stunned how fast GitLab overtook GitHub feature-wise, but looks like now they're at least trying to compete.

</comment><comment><USER67> And in the darkness combine them?

</comment><comment> cool-RR Obligatory XKCD comic: [https://xkcd.com/927/](https://xkcd.com/927/)</comment>