HNHacker News
TopNewBestAskShowJobs

triMichael

170 karma · joined September 16, 2016

submissionscomments
triMichael··on Python in the Windows 10 May update
I very much agree and love how the programming language AutoIt does it. When I was starting out, both C and Java took several frustrating hours to set up (don't get me started on requiring environment variables to be manually changed). However, after a basic installation, AutoIt gives its au3 files a right-click context menu option to compile to an exe. It also gives you a shortcut to a help file that contains basic examples, a complete list of language concepts, and a complete list of all first party functions and a page on every single one complete with an example of how to use it.
triMichael··on Reasons Python Sucks
My take on this is that it has some valid points, but is mostly unjustified rants:

1. Versions: Definitely an issue with Python, the v2 to v3 split was a huge mess and is Python's biggest issue IMO.

2. Installation: Pros and cons, what I find is that Python tends to be easy to set up, but that it does it automagically for you via pip, which means if you run into trouble it is harder than doing it manually

3. Syntax: Python's syntax is wonderful and I find these arguments mostly flawed. The space vs tabs wars are the exception and a valid criticism that the language doesn't force one or the other. As someone on the tab side, I don't run into his issue at all of accidentally putting 3 spaces instead of 4 in, but then I do run the issue of going against the language's grain so to speak.

On the other hand, his issue about deep nesting is a problem in any programming language - unless he is not indenting properly when he wants to, which is my guess. If that is the case, that will cause severe issues when anyone else tries to read it! Debug code without indents also sounds like a bad idea to me. And even if you aren't a fan of Python's whitespace, I find that there are other features, such as using words instead of symbols (and, or, not instead of &&, ||, !) that definitely make Python one of the most readable languages out there.

4. Includes: I'm mixed on this one. On the one hand, I don't understand the first half of what he is saying, I have to go track down includes in any language. In Python at least I only have to deal with one include, whereas in C and C++ I have to go track down two, the header include and the actual library. This mostly seems to be complaining for the sake of complaining.

The last bit I personally agree with though. I once worked on a project that would analyze other people's Python code. At first Python seemed to do this extremely well as it can take any Python code and change it into its abstract syntax tree for further analysis. However, I soon found that in order to do this, it would have to execute any global code while it was reading it! I'm definitely not a fan of how Python technically runs anything it imports.

5. Nomenclature: Definitely unfair criticisms here. First, Python's lists aren't arrays but are lists! Arrays are blocks of unchanging memory, whereas lists are a structure that under the hood points to an array, but that array can be deleted and reallocated to resize it. I admit, I've never liked Python's word for dictionaries, but I don't like hash either, I think map is the better term, but it's still just a single name of a concept, not a huge deal. His arguments about the names of libraries are stupid, they are third party libraries that Python doesn't even control! And as someone who is very picky about function and variable names, a library name hardly ever matters, especially as Python allows you to rename imported modules.

6. Quirks: I don't even understand what his complaint is here. Does needing to triple quote multi-line strings really bother him that much? The binary and raw syntax might be a bit confusing, but I'll take that any day over C++'s L"" for wide strings and _T() for strings that may be wide or not and are determined at compile time. The string vs unicode is a bit confusing, I'll give him that, but I think the entire concept is confusing in any language.

7. Pass by object reference: I actually completely agree with him here, though I don't know how Python would fix this. I think I can explain it better than he does though. The issue is that if you create a list "list1" and then set "list2 = list1", and then append the element "3" to list2, list 1 changes as well even though list1 was never directly changed. This was one of the biggest things I struggled with in Python until I learned C++ better which taught me how Python was working under the hood. Python makes you think that it doesn't have pointers, but the truth is that everything in Python is a pointer, which I found confusing relative to how everything else in Python was beginner friendly.

8. Local names: I don't really understand his complaint here, don't shadow names.

triMichael··on Reasons Python Sucks
I think I can answer this one because it is one of my gripes of Python. The problem isn't that it doesn't copy, rather it is that the = assignment operator specifically doesn't copy.

If you create a list "list1", set "list2 = list1", and change list1, both of the lists change. When I learned Python, this was a major source of confusion for me. Eventually I learned that in Python, instead of nothing being a pointer as it first appears, it is actually that everything is a pointer. On the other hand, while the same things occur in C++, the assignment operator does a shallow copy and anytime you are doing a pointer copy it is explicit.

triMichael··on Music for Programming
Sure! I found Solar Fields by looking for Mirror's Edge remixes and stumbled onto whole songs. Solar Fields has several albums, it's a massive group and I think it's just one guy.

Also recently found there is a sister group called H.U.V.A. Network that's pretty good too but has a slower and darker feel.

triMichael··on Music for Programming
Solar Fields, the group that made the music for the video game Mirror's Edge, is one of my favorite groups for programming.
triMichael··on Saturated fats no longer the true enemy, experts say
As someone who is obese and working on it, my suspicion is that it's mostly sugar. If you look at "processed" foods you'll see tons of sugar, which is both very bad and not very filling. One thing different from home cooked sugary treats is lots of spices and additives like salt and MSG that make you feel more hungry and thirsty which keeps you eating more of the high sugar non filling processed foods in a vicious cycle.
triMichael··on American Men Heading for 25% Unemployment by 2050
I edited my comment to say title and post. After reading a bit more thoroughly I realized he doesn't blindly use the graph data. But that title on the post is sure misleading! I guess the article title "A disaster is looming for American men" was a bit too vague for HN, but I think the replacement title is flawed.
triMichael··on American Men Heading for 25% Unemployment by 2050
Bad logic and flawed data extrapolation in the title and graph. You can't extrapolate percentages linearly over large amounts, otherwise by the year 2550 there will be 125% unemployment. As usual, relevant XKCD: https://xkcd.com/605/
← PreviousPage 2 of 2