HNHacker News
TopNewBestAskShowJobs

6thaccount2

393 karma · joined June 16, 2019

submissionscomments
6thaccount2··on Why Are So Many Developers Hating on Object-Oriented Programming?
Yea, but did you open a book on either language?

I've trudged through a few Lisp books and tutorials and at least part of a Haskell book. You're right that syntax-wise they're very different than Python & Java, but the simple examples aren't hard once you learn more. Granted, I can't write even moderately advanced Haskell code, but quick-sort and some list comprehension code shown in "Learn you a Haskell" is pretty straightforward. "Real World Haskell" is also not too bad (at least the first few chapters). If you're even aware of Lisp & Haskell, you'll be able to pick them up at least at a superficial level with a little effort. Lisp is just weird due to the parentheses and the pre-fix notation, but the principles are very simple and allow you to directly manipulate the syntax tree as there is no difference between code and data. For example the simple lisp expression (+ 2 2) returns 4. What about (* 2 (+ 2 2))? The inner expression returns 4 and that is passed to the multiplication operator with 2: (* 2 (+ 2 2))###### (* 2 (4))###### (* 2 4)###### 8######

Edit: I have no idea how to format things on HN, so I out six "#" to represent a new line.

Btw...David Touretsky's Common Lisp book is extremely high level and approachable. My biggest issue with many lisps is that installing and learning the tooling (Ex: Emacs) is a huge pain. I'd recommend you start with Racket as it is like Python in that it comes with a simple IDE, so you can focus on the language and not the tooling. Racket also has a lot of libraries for a niche language.

6thaccount2··on Can Chess Survive Artificial Intelligence?
I have a decent amount of friends. Of the ones who live nearby, none play chess.

There are some chess players in my city, but I haven't the time for that level of commitment.

Playing online via an app with up to 24 hours per move and in-app chatting is best for me. Sure the person can cheat, but I assume most would rather play fairly and win of their own accord rather than a meaningless win via cheating.

6thaccount2··on The Dizzying Capabilities of Mathematica's Import Function
I've always been extremely impressed with Wolfram Mathematica's import function. This one call can handle importing images, text, file I/O, optimization files, geographical file formats, genetic encoding files...etc etc. The consistency is what is truly impressive here as even though Python can probably do much of the same things, each type that isn't built-in uses an entirely different library with different conventions.
6thaccount2··on G.E. Is Accused of $38B Fraud
Yea this is getting a lot of headlines.

The fact that they put up a gefraud.com and they call them "GEnron" is interesting.

6thaccount2··on Scala Native
As a non developer, but someone who codes, the hire for Java mindset always confused me. If I can pickup an entirely new language (with the exception of Haskell) in a few days, so should a professional. Then, I noticed how low the bar is for an average developer when it comes to understanding their tooling, basic commandline knowledge, and problem solving. Sure, the best developers can solve a business problem with pretty much anything if they have to, but the average one chooses a major language and framework and hacks things together with stack overflow. We've all done that before, but then again good problem solvers are also capable of picking up a book and learning something new like Lisp and a lot of developers simply aren't going to do that ever.
6thaccount2··on Maybe We Should Stop Creating Inscrutable CLIs
Great reply! This has helped me tremendously!
6thaccount2··on I Miss Microsoft Encarta
Encarta was awesome as a kid. I never knew it was Microsoft that made it. The trivia game was creepy and fun.
6thaccount2··on J can look like APL or English
Yes I remember that reply which came from him, but forgot to mention. It is an interesting idea.
6thaccount2··on J can look like APL or English
Charles Moore did that with Color Forth and even though only he was using it, I remember several comments on how that is unfair to the color blind or visually impaired which is an interesting point.
6thaccount2··on Maybe We Should Stop Creating Inscrutable CLIs
Thanks for your thoughts. You're probably right about the pipe dream.

I agree that there isn't much commercial incentive, but I honestly don't see why major OS providers can't include some basic graphics primitives in the OS. I'm not talking about embedding the unreal engine or anything. It could be used for a lot more than primitive games btw.

I understand the desire to avoid more bloat. I can't believe Windows 10 requires the storage and RAM that it does.

The XML & JSON objects are pretty cool.

I'll check out Accord.NET framework too.

6thaccount2··on Maybe We Should Stop Creating Inscrutable CLIs
First of all, thank you for the detailed reply with examples.

I didn't know that slightly modifying "Get-Content" could speed it up so drastically. As we've both stated, it isn't very obvious or intuitive without knowing the detailed inner workings of the cmdlet. Do you know why the "Get-Content" can't be more like the $x = ${'path'} option by default? Also, what is going on in that example and how is it so much faster than "Get-Content"?

The examples where you call out to .NET directly aren't too bad (well at least the first one is terse enough), but there are a lot of users like myself who don't write much C# and therefore don't know which namespaces to call for .NET voodoo. The reason I learned Powershell was so I wouldn't have to use C# for scripting as it really doesn't Excel there being statically typed and not having an interactive REPL. If I have to constantly write C# for performance, I might as well just write C# lol.

I'm glad to hear Powershell 7 will get performance improvements and am sad it won't change anything here, but at least I can try out your examples!

As far as Powershell performance is concerned, I still don't understand how some cmdlets can't call out to something pre-compiled. Does all the powershelly parsing and dynamicism really hurt that bad?

6thaccount2··on Maybe We Should Stop Creating Inscrutable CLIs
No problem. I'm certainly not an expert, but that is mainly due to the deficiency I mention above. I'd use it for a lot more use cases if it could handle those scenarios.

I think Powershell "jobs" can help run things in parallel, but I've never done more than just read about it. The Powershell in Action book (3rd edition) covers that functionality I think. The first chapter to that book is pretty awesome.

My dream as someone forced to use Windows would be for Microsoft to use some dollars to make Powershell a one stop shop for data science, simple games (think commodore sprites), numerical computing...etc. That sounds a little wacky I know, but I think people would appreciate every computer shipping with a powerful environment like that. Since Powershell is built on .NET, surely someone could make a library for Powershell that abstracts away some of the .NET complexity to where I can just do something like:

Process-Data -data "blah.csv" | Create-PieChart -output "chart.png"

Not having to install Anaconda and import a ton of libraries on the target computer would be helpful. Note that I'm not saying to reproduce all of Matlab in Powershell, but putting some of the most popular routines as built-in commands would be pretty awesome.

6thaccount2··on Maybe We Should Stop Creating Inscrutable CLIs
Powershell is almost good, yet it falls off the mark in about a dozen ways.

A lot of very simple things are harder to do (text is easier than objects up until a point) since Powershell treats everything as objects and LinuxCLI/Bash does everything as text being piped around to specific commands.

The biggest complaint I have with Powershell is that it is so obnoxiously slow at parsing text files, that it just can't do basic scripting tasks on even medium sized files ~100MB without tons of StreamReader[] overhead or without calling a pre-compiled C# binary directly. This is the biggest fail. Nearly all the obvious ways of appending to files or parsing them stop working once the file size gets bigger than tiny. This isn't a problem with Linux commands that just pipe text to highly optimized C binaries. I'd drop Python for 90% of my scripting tasks on Windows if Powershell were faster in this area, but it is just painfully slow (if all the obvious ways of doing something in Powershell take ~5min when even Python can do it in ~4sec, you have a problem).

However, you can usually write some very beautiful and easy to read code by using the built-in objects once you learn them. I also like how powershell's functions allow you to create commands with parameters in a super easy way so you can easily build DSLs in a way. Everyone feels differently, but calling my commands in this manner (InvokeCommand -param1 "blah") reads a lot more naturally to me than (Object.Method(param1)). Also, Powershell can handle things like filesystem interaction in a way that doesn't feel like a bolted on afterthought as Python's does.

6thaccount2··on Dependent Haskell Is the Future (2018)
I really wish you could use all of the adacore stuff for free in commercial closed source software and just pay for IDE support and maybe some specific libraries.
6thaccount2··on Dependent Haskell Is the Future (2018)
Ada with Spark is pretty cool.
6thaccount2··on Dependent Haskell Is the Future (2018)
Yea...my first language that I got really comfortable in was Python (used Matlab, Assembly, C, Basic...etc in college). I've since then dabbled in: C++, Ada, Rust, Nim, D, Haskell, OCaml, F#, C#, Java, Clojure, Scala, Kotlin, Common Lisp, Racket, PicoLisp, Groovy, Powershell, Bash, TCL, Julia, APL, Forth, J, Rebol, VBA...the list goes on. I've only ever gotten shallow in these languages, but have always found something missing (I'm sure others have said the same about Python, but I wanted to add my anecdotal experience).

Out of all of those, I've pretty much stayed with Python as it keeps letting me get my job done with minimal code and maximum readability. I've been almost as efficient in Julia and have gradually picked up Powershell's quirks and find them all good for scripting tasks where you don't create too many pages of code.

Would I migrate with a large codebase? It depends on the industry of course, but if it is common line of business applications I'd be hard pressed to find something else. I was really hoping Kotlin could help here with it's REPL/Scratchpad and being on the JVM, but I didn't end up being too impressed (it might take more time).

I don't want to contribute to a static versus dynamic never ending argument. I guess I will say that Haskell, the JVM, and .NET just seem to have to much ceremony around them. I'm sure it's very powerful, but there is a lot to learn that distracts from just writing code.

6thaccount2··on Student hacks high school software and finds “SQL injections galore”
I don't write anything user facing, but write plenty of scripts that query a database, return a dataset, create a data frame, and then do statistical analysis on it. The SQL is all pretty straightforward with no ORM and is really easy to understand and use.
6thaccount2··on Texas Power Prices Briefly Surpass $9k Amid Scorching Heat
$9k is fairly artificial in that it comes from the $9k ERCOT ORDC (operations reserves demand curve) meaning they did a study awhile back looking at Texas GDP and the cost of lost load and judge it to be ~$9k per MWh. This means when the optimization software has a shortage of their operating reserves the prices jump up to that level.
6thaccount2··on Python Is Eating the World
Wait...are you studying for the FE without getting an engineering degree? Props to you. One thing to keep in mind though is that there is a morning and afternoon session that are both 4 hours iirc. The first session is always a general session which covers the absolute basics of Engineering math, circuits, thermodynamics, statics, Dynamics, chemistry, and physics. It really is very easy if you remember the classes. Some of the circuits problems can be done in your head and the statics problems might have the resultant force being part of a 3-4-5 right triangle (again, it shouldn't take much thought). The purpose of this is to ensure you learned the absolute bare minimum in these classes. One reason the general questions have to be easy is that depending on your course schedule, it might have been two years since you took a course (Ex: you might have taken only one thermo class as an electrical engineer during your sophomore year). The afternoon test is either also general or specialized to a discipline (Ex: chemical engineer) and are much more difficult in comparison. I barely studied for the FE and felt I knocked it out of the park (especially the morning session). I spent months of all my free time studying for the PE and failed the first time...it is difficult. Keep in mind that both of the tests have a lot of breadth, but little depth. Going into an actual Engineering curriculum will teach you a whole lot more. MIT used to (might still) have a circuits Edx class online for free which covers the first out of 3 circuit classes a EE will take...that should help a little with the scale.

Software is weird as the hardware, languages, and frameworks are always changing and the optimal work done on any project seems to be just enough to keep the customers from going to a new product and not necessarily the best or even a good product in many cases. There are cost constraints in Engineering as well (good, fast, & cheap...pick 2), but it still feels pretty different to me than software engineering where something breaks all the time in any non mainstream software I've ever used.

6thaccount2··on The Horror of Microsoft Teams
What are you using Matlab for? Ever try Octave, Scilab, or Julia?
6thaccount2··on Python Is Eating the World
As someone with a P.E. license that spent hundreds of hours studying and had to sit for that excruciating 8-hour exam twice, I don't think even 5% of the software developers in the US could pass an equivalent exam. Granted, I think the sector I took it in has a harder test than some, but it is a weed out test for someone that already took 4 years of Engineering school.

Some takeaways from this: 1.) I learned a little bit from studying, but overall even though it was hard, I would've learned a lot more by getting a Master's degree. 2.) The test isn't good at determining if you're good at your job or honestly even minimally competent in your area. For example, even in a specialized field (power systems engineering), there are thousands of diverse jobs (power generation, distribution, electrical contracting, power transmission operations, power transmission planning....etc etc) so the test only had a few questions on my particular area. 3.) There are a lot of amazingly smart people working in software, but the skill range seems to be bigger than in traditional engineering fields where most engineers are fairly similar in skillset (there are some outliers) as they all generally have to pass the same courses if their university is accredited (talking about USA here). In the software world, you have software engineers and computer science doctorates mixed with someone with very little training that is trying to wing it. That means the dataset has a far greater range on skillsets. One employee might have had a class on compilers while another just learned what a for-loop is. In engineering, we generally all show up to the first day of work with the same building blocks (thermo, statics, Dynamics, circuits, differential equations, stats, calculus, basic programming...etc). The only difference between me as a senior engineer and a new hire is 9 years of experience, knowledge of the business and tools and ability to get things done without oversight. It makes a big difference, but I wouldn't expect them to be lacking any of the tools or training that I have picked up (ok...maybe databases).

I'm struggling a bit to convey the overall message that software engineering seems a bit different and licensing would therefore need to be different if done. Perhaps you could have licensing for individual subjects? For example, you could pass a basic test on relational databases where you prove you can do basic operations such as select, where clauses, joins, updates, exports...etc. Then you'd have another to prove you were minimally competent in Java? Would that be of any value to an employer? I don't know. I'm guessing someone already does this for Oracle and Java too.

6thaccount2··on Python Is Eating the World
Julia really is nice in this way. It is nice to see the package manager that actually works for me unlike a lot of what I try with pip.
6thaccount2··on It’s All Greek to You and Me, So What Is It to the Greeks?
Haha...the less successful forerunner to Esperanto (which I've been having a blast with on Duolingo).
6thaccount2··on Ted Chiang: Realist of a Larger Reality
These stories are all amazing (talking about the anthology with story of your life) and out of them came one of the best sci-fi movies in a long time.

My favorite story though is the one with the two people who become super intelligent and go to war amongst each other. That one was crazy.

6thaccount2··on Escape rooms are big business
I really like the idea of escape rooms, but have never had the chance to do one. My area just had one or two shut down, so I might have missed the chance.
6thaccount2··on Power-Line Communication
BPL is a neat concept for very rural areas, but was expensive (iirc a broadband regenerator unit is needed for a certain length of line (Ex: every 1 mile) and is not cheap. Also, the interference for things like radio communications was never really accepted.
6thaccount2··on Alan Kay's answer to ‘what are some forgotten books programmers should read?’
Internal team wiki covering my industry which is power systems (transmission level stuff).
6thaccount2··on Alan Kay's answer to ‘what are some forgotten books programmers should read?’
I have both books sitting next to each other on my bookshelf. In everyone's defense...both are extremely dense reading material.
6thaccount2··on Alan Kay's answer to ‘what are some forgotten books programmers should read?’
"low on pedagogical focus"

Although I have some duds, the hundreds of pages of wiki contributions I've made are nearly all designed to be what I wished existed when I was learning said details. Sadly, they only help to a certain degree. The individual really needs to want to learn to get any real lasting benefit.

6thaccount2··on Racket: Lisp for Learning
That's the one, thanks!
← PreviousPage 3 of 8Next →