HNHacker News
TopNewBestAskShowJobs

pistacchioso

74 karma · joined December 31, 2012

submissionscomments
pistacchioso··on Show HN: Sonauto – A more controllable AI music creator
You know what's really controllable if you want to create music? Learn music theory, practice an instrument and start a band.
pistacchioso··on Aider: AI pair programming in your terminal
Most of the discussions about AI applied to coding end up having someone who states that it's just not worth it (at least the moment) and someone else who then chimes in to say that they mostly use it for "boilerplate" code.

I have trouble understanding the "boilerplate" thing because avoiding writing boilerplate is

1) already a solved "problem" long before AI

2) is it really a "problem"?

The first point: * If you find yourself writing the same piece of code over and over again in the same code it's the indication that you should abstract it away as a function / class / library.

* IDEs have had snippets / code completion for a long time to save you from writing the same pieces of code.

* Large piece of recycled functionalities are generally abstracted away in libraries of frameworks.

* Things like "writing similar static websites a million times" are the reason why solutions like WordPress exist: to take away the boilerplate part of writing websites. This of course applies to solutions / technologies / services that make "avoid writing boilerplate code" their core business

* The only type of real boilerplate that comes to my mind are things like "start a new React application" but that is a thing you do once per project and it's the reason why boostrappers exist so that you only really have to type "npx create-react-app my-app" once and the boilerplate part is taken care of.

The second point: Some mundane refactoring / translations of pieces of code from one technology to the other can actually be automated by AI (I think it's what you're talking about here, but how often does one really do such tasks?), but... Do you really want to? Automate, it, I mean?

I mean, yes "let AI do the boring staff so that I can concentrate on the most interesting parts" make sense, but it's not something I want to do. Maybe it's because I'm aging, but I don't have it in me to be concentrated on demanding, difficult, tiring tasks 8 hour straight a day. It's not something that I can and it's also something that I don't want to.

I much prefer alternating hard stuff that require 100% of my attention with lighter tasks that I can do while listening to a podcast and steam off in order to rest by brain before going back to a harder task. Honestly I don't think anyone is supposed to be concentrated on demanding stuff all day long all week long. That's the recipe for a burnout.

pistacchioso··on Why C++ sucks (2016 edition)
Hm, no, it sucks. "I can do that with ease because I've done it so many times" is really a terrible argument to explain why something is good. If you've lost a leg, walking with a crutch becomes second nature to you, but that doesn't mean that's the preferred or most efficient way of walking for the human being.

Yes, you know by heart that all_of requires "foo.begin()" and "foo.end()" and the capture context "[]", but it doesn't negate the fact that many other, better languages, just know how to cycle an array without having to specify begin and end, know how to capture arguments when needed, don't require a useless (in this context) return, nor clutter a single line of code with nine differenct gibberish symbols like "(", ")", "::", ",", "[]", ";" "{", "}".

Take the ultra humble javascript: foo.every(a => a % 2)

When you need three times the characters to obtain the same result, and those charcters are a clusterfuck, it is not relevant if years of usage made you comfortable nonetheless with it.

pistacchioso··on I’m a web developer and can't make anymore the simplest web app
This. If you read the comments here seems like I've been stuck in analysis paralisis because I didn't use Redux, Webpack, Clojurescript, Ember. Guess what? Maybe I should investigate those four, right? This surely solves the problem. /s
pistacchioso··on I’m a web developer and can't make anymore the simplest web app
I find C# to be better, but things are ok everywhere as long as they're kept easy. I think that function (param?: Array) is simply better than function (param) because the IDE can hint you that the function accepts a single parameter, that it is optional and warns you if you try to pass a string because it must be an Array.
pistacchioso··on I’m a web developer and can't make anymore the simplest web app
is there a reason you decided to be unpolite unsolicited? nobody is going to appreciate that
pistacchioso··on Why You Should Uninstall Firefox and do Some Soul Searching
Maybe this now sounds mundane, but I also uninstalled Firefox and not because of gay activism, corporate identities, political influences. I uninstalled it because it's become a bloated, slow as fuck software. Everytime I'm working on Chrome and I have to fire Firefox up to test a site, I insult it for all the time it takes to start up. If something doesn't work, I open up the console and I'm impressed by how unusable it is. Maybe I've been spoiled by WebKit's one, but I find it a pain to work with Firefox.
pistacchioso··on Why I'm Ditching CoffeeScript
tl:dr; pull request gets rejected, author enters a drama queen mode taking it personally and over emotionally.
pistacchioso··on Why I like Java
The "Har-har-so-many-classes-and-don't-even-get-me-started-on-variable-names" argument is true.

Sure, you can overdesign in any language, but some inner language characteristics of Java lead to it more than other languages do. Copying input to output is a statement, if you think about it in in a logical, human way: "I want you, program, to perform the action of copying this to that". But Java, unlike some other languages forces you to say: "Make a class, make a main function because YOU need it, Java, and only after please do what I really want and copy that input to the outout".

In python, for instance, I'm in control of whether making a StreamCopier class, a copy_stream() function or just get to the core of what i want and write "print(input())".

Generally speaking, in most dynamic languages if I want to access the to_string() method of something passed to a function, I can pass a list, an int, a Duck object and till it has a to_string() function I'm good to go, or I can even monkey patch to_string() and call it a day.

In (too) many cases Java the language forces you to make instances over instances and implementation of interfaces and the like just to access the data you need in the way a framework or a method wants, not you, and often this is frustating because you see your data "just there" and the language fights against you preventing you to acccess it in an easy way. I need to call to_string() of SomeClass but I have an instance of SlightlyDifferentClassStream? Good luck with that, maybe the only possible way is to create a DifferentClassConverterProxy just to have a DifferentClassTranslator, extend TraslatorStream, feed it with my SlightlyDifferentClassStream and have something compatible with SomeClass.

This is not only true to Java, some of these "problems" arise from it being a statically typed pure OO language (a very good thing on my book when it is not implemented in a dumb way) that is put to shame by a cleaner implementation of the same principles like the one seen in C# that, on top of all, also offers a powerful dynamic programming, lambdas and so on.

Also, Java suffers from an enterprisey background. I consider a language environment to be a very relevant part of a language itself, and Java has promoted the proliferation of ridiculous bahamut frameworks with a freaking large number of classes and instances "just in the case someone needs to extend it".

These are facts, not "Har-har-so-many-classes".

Take a sane implementation of a web framework like Django. It is an opensource project born from the needs of a small group of developers. You don't have "so many classes" if you only write those that you really need to solve of your problems, and the project progresses from there to embrace the everyday, real world needs of a larger group of contributors. Most Java frameworks I've worked with really give me the tangible perception of a large group of monkey developers programming them following line by line a technical specification bible of thousands of pages written by a council of architects with business people yelling at them "mooooore, mooooore, we need more of all of this so that we can sell to ANYONE!"

pistacchioso··on Poll: what's your primary editor/IDE?
*jumping forward to
pistacchioso··on Poll: what's your primary editor/IDE?
for myself, when someone corrects somebody on what they "meant" to say, it means that they got the question right in the first place, so there's nothing to correct if not for the sake of being polemic.

IDE or text editor, OP wants to know where you write the lines of of code that compose your programs.

pistacchioso··on Extreme Programming, a Reflection
Putting my headphones in, drifting in my own, private world of code is to me one of the simple pleasures of life. Ok with short meetings and thight, small schedules and the like, but put someone watching at my screen while I'm coding and I can easily commit an homicide.
pistacchioso··on Ask HN: Why is the hacker scene so hostile to women and black people?
It'a not. Where I work we are usually open for programming positions. Girls simply don't show up, it's not like there are hundreds of them that we send back home because they're women. When I'm on github and I fork something from supernerdy81, i don't even know if it's a he or a she, nor I care and surely that wouldn't make any difference in using a library. Just to say. It happens that men are eventually more interested in technology than women, generally. You can see it among your friends or family. There are things that attract women's interest most. It's not that knitting community is hostile towards men, it's just that few men (me, for example) are interested in knitting.
pistacchioso··on Top Artificial Intelligence system is as smart as a 4-year-old
It's just a false clam and treated as such. Hacking a program that solves certain specific problems, given precise parameters and boundaries, like or better than a 4 year kid does not mean it has the intelligence of a being that routinely learns by himself, explores the world making up opinions about, expresses creativity and emotions.

This is just like claiming that Google Translate is more intelligent that the average American first grader because it can translate from Hebrew to Finnish better.

pistacchioso··on This is a regular text file. People will read it. Maybe.
When referring to the post that inspired it, it would have been useful to take advantage ad some kind of technology that, let's say, allowed me to click with my mouse on that link you wrote and be magically transported there.
pistacchioso··on Microsoft: Internet Explorer 10 Is The Most Energy-Efficient Browser
if you can't beat them with performance and features, go the green way,
pistacchioso··on Seriously.js
I can confirm this. On Chrome, though (same machine and same webkit, I guess) it runs smoothly.
pistacchioso··on The 21st century skill students really lack
you can spot the resemblance only after two hours of staring at the painting.
pistacchioso··on Etsy accused me of not assembling my synths by hand and shut down my shop
> As a musician when I purchase a synthesizer, I am buying the circuit. The enclosure/build quality/etc is secondary, though obviously an important consideration.

The enclosure may be of secondary importance to you as a musician, but from a "hand making" point of view, when I buy a synth, I'm buying many hours of work that went into making a solid, good-looking case around the circuit, applying filters and responsive knobs and patches and all sort of inputs and outputs and maybe a keyboard and other kind of controllers.

If we justify that Etsy is entitled to not consider handcraft a hand made synth because the main source of sound may not have been engineered by the seller, tomorrow they can as well ask any seller of knitted wool sweaters to provide pictures of them shearing those sheep whose wool has been used because users say:

"As a wool sweaters aficionado when I buy a sweater, I am buying the wool"

pistacchioso··on [dead]
I don't know if what I'm about to write applies to education in other countries, since my experience is based in Italy.

Well, there are a lot of things that your parents tell you "for your interest" when you're young and that you're supposed to understand when you grow up. For example, in high school, I had a fair amount (read: 5 years straight) of ancient Greek and Latin. I thought it was useless, why bother learning stone dead languages at all? The canonical answer was that in the process of studying those "useless" things I'd be acquiring a method for studying and exercise logic.

More than 10 years have passed since I finished high school, and you know what? I call bullshit with much more conviction that 15 years ago when I was first exposed to "agricola agricolae agricolae". If you want my logic to improve, why don't provide programming classes? It's a better exercise in logic and with a "secondary" effect I'm learning a job, and one of the more requested.

I'm a professional programmer, I never had a hard time getting a job, but that's because I self-taught myself how to program (starting way earlier than Latin classes), but it makes me angry nonetheless to think about some of my friends who are unable to get a decent job because, surprisingly, it seems like 2013 companies are not so much in need of people half-fluent in ancient Greek. This also extends to universities, of course, where providing real world skills (at least in most Italian universities) seem not to be an point that raises any interest.

One of our interns, lately, had troubles working on an application we developed with a Python backend, a fairly complex javascript-driven frontend that talked to a node.js server taking some data from a Java API. Turns out all he knows after 4 years of studying programming at the university is a bit of Prolog and some Fortran. He was also unable to ssh to our servers.

pistacchioso··on John Carmack starting port of Wolf 3D in Haskell
http://en.wikipedia.org/wiki/John_D._Carmack
pistacchioso··on Microsoft Prepares U-Turn on Windows 8
When they do they mandatory customer surveys (to come up with ideas like "what people want from their desktop PC is t he ability to touch all over like crazy) I wonder WHO they interview. I maybe a power user, but every time I have to reach for the mouse interrupting my workflow on the keyboard (like when programming or writing) I treat it like a failure in my setup. When I'm working on something other (music editing software, Photoshop), I tent to use a pen tablet because the mouse is not accurate enough (but certainly more accurate that my finger).
pistacchioso··on Tearable Cloth Simulation in JavaScript
well, this sounds like a pc critic in the 70s. "what's new with this thing called personal computer? I see nothing new that couldn't have been done on a mainframe it my university five years ago". but yes, the differ de is that you have now that power in your bedroom. similarly, i guess that most people visit more web pages each day than they download programs, so yes, new-old possibilities in the browser ARE a relevant thing.
pistacchioso··on Things I Wish I Had Known Before We Got Married
If you put your feelings on a spreadsheet and make charts out of it, you're gonna be a bad husband.
pistacchioso··on The Node.js Community is Quietly Changing the Face of Open Source
Irrelevant but I must say it: Node.js forced async IO is its strength but programming it is a pain in the butt.
pistacchioso··on Hackers can be business guys, and other lessons from Paul Graham
Maybe both are just experience, but in the process of learning when I fail at coding, it's just "fuck that, I'll try starting with a simpler task". If you fail at business you may find yourself on the road and bring people with you.
pistacchioso··on OS X 10.9: A downward spiral or a new hope?
oh, the irony. one line he says that he's a clever user that understands business, the other line suggests that what apple should do is change the filesytem. can you picture it? tim saying "one more thing to excite you" and announce a new filesytem instead of, say "Siri on your desktop"? I image 95% of the user base thinking "you updated the WHAT?!"
pistacchioso··on Setting up Sublime Text 2
I think vi speed is much more theoretical than practical. v5j to select the 5 lines below? Sure, I can't think of a faster mode. BUT in reality

1. you have to check if you're in insert mode or not. Or you think you are, you're not, write vf5, press esc, press u to undo, retype vf5. Or you don't know and you press esc before it, so it's actually esc+v5j, and esc is not the easiest reachable key

2. you have to know you want to go down 5 lines. In reality, you know you want to go "a bit" down, so in a real world situation you either count (slow), make a subtraction with line numbers (slow) try to guess a number of lines, check what you've reached, keep retyping. This is all but "cognitive free". What is cognitive free (although requires more keystroke) is just press shift+down+down+down+down+down, for me.

pistacchioso··on Not Lisp again (2009)
My personal "wow" moment with Lisp was this:

(+ 1 2)

I was thrilled in the moment when I realized that all of the three parts of this banal form can be an arbitrarily complex forms themselves. For example, you can in place substitute "+" with a long code that contacts a web service and in the end, after 100 lines of code, returns "+". This 100 line function is made of forms made of forms made of forms and each can be replaced by the code that you might need. It's the beauty of the conciseness of the ternary operator in other language (a = b? 1 : 2) taken to a possibly infinite extreme.

This can sometimes be achieved in other languages with the use of temporary variables, one-shot functions if the language doesn't have lambdas (or multi-line lambdas like Python) and in the end litter your soul with the use of "eval"

This also leads to the other wow moment, when using Lisp makes it appear other languages' syntax so inelegant and cumbersome. At its core everything in Lisp is just like this:

(FUNCTION argument1 argument2 …)

When it clicks, it really hits you with the beauty of its perfect mathematical purity and you wonder how can you feel so comfortable with the average C-like language, where for has a syntax that is different from while, switch case is a beast of its own, sometimes you use curly brackets, sometimes square, sometimes regular or even angular, you don't have to forget commas and semicolons, you use colons and dots and question marks and myriads of keywords each with its own syntax and some things are functions and other operators and equal means something different from the double equals and so on.

pistacchioso··on “Paleofantasy”: Stone Age delusions
If you spend your day harvesting a field or running after animals to pray them, you're not going to be obese, you're more likely to gather fat if your day is taping on a computer, but this has nothing to do with diet. Also, I won't the lifestyle of a period of our history, as a species, where the expected longevity was something like 30 years against 80+ of today.
Page 1 of 2Next →