Profile

Cover photo
Antonio Vaccarino
Works at Laboratori Guglielmo Marconi
Lived in Bologna, Italy
105 followers|44,893 views
AboutPostsPhotosVideos

Stream

Antonio Vaccarino

Shared publicly  - 
 
 
Explore the top ten free Minecraft alternatives, all released under open source licenses, reviewed and brought together into one handy collection.
1 comment on original post
1

Antonio Vaccarino

Shared publicly  - 
 
 
Photo of the Day: Storm chaser and #YourShot member Paul Brooks captured this "perfect alignment of the elements" just east of Mount Pleasant, Iowa. #photography
A rainbow and lightning collide in a composite image of an Iowa storm in this National Geographic Photo of the Day.
100 comments on original post
1

Antonio Vaccarino

Shared publicly  - 
 
 
A lesson in shortcuts.

Long ago, as the design of the Unix file system was being worked out, the entries . and .. appeared, to make navigation easier. I'm not sure but I believe .. went in during the Version 2 rewrite, when the file system became hierarchical (it had a very different structure early on).  When one typed ls, however, these files appeared, so either Ken or Dennis added a simple test to the program. It was in assembler then, but the code in question was equivalent to something like this:
   if (name[0] == '.') continue;
This statement was a little shorter than what it should have been, which is
   if (strcmp(name, ".") == 0 || strcmp(name, "..") == 0) continue;
but hey, it was easy.

Two things resulted.

First, a bad precedent was set. A lot of other lazy programmers introduced bugs by making the same simplification. Actual files beginning with periods are often skipped when they should be counted.

Second, and much worse, the idea of a "hidden" or "dot" file was created. As a consequence, more lazy programmers started dropping files into everyone's home directory. I don't have all that much stuff installed on the machine I'm using to type this, but my home directory has about a hundred dot files and I don't even know what most of them are or whether they're still needed. Every file name evaluation that goes through my home directory is slowed down by this accumulated sludge.

I'm pretty sure the concept of a hidden file was an unintended consequence. It was certainly a mistake.

How many bugs and wasted CPU cycles and instances of human frustration (not to mention bad design) have resulted from that one small shortcut about  40 years ago?

Keep that in mind next time you want to cut a corner in your code.

(For those who object that dot files serve a purpose, I don't dispute that but counter that it's the files that serve the purpose, not the convention for their names. They could just as easily be in $HOME/cfg or $HOME/lib, which is what we did in Plan 9, which had no dot files. Lessons can be learned.)
110 comments on original post
1

Antonio Vaccarino

Shared publicly  - 
1

Antonio Vaccarino

Shared publicly  - 
 
 
Python 2.7.10 is out!

Do make sure your code can handle the two-digit bugfix release number.
The official home of the Python Programming Language
49 comments on original post
1

Antonio Vaccarino

Shared publicly  - 
 
 
This secret Door of Durin only illuminates when touched. We need this because reasons. http://j.mp/1cPj0Mc by Neular
25 comments on original post
1
Have him in circles
105 people
Sergio Rizzi's profile photo
Jenna Elizabeth's profile photo
Fantastic Maps's profile photo
Abigail Sarpong's profile photo
Joseph Teller's profile photo
Gian Maria Battistini's profile photo
Studio Kulla's profile photo
Paolo De Murtas's profile photo
Steve Leon's profile photo

Antonio Vaccarino

Shared publicly  - 
 
 
Android Studio 1.4 Preview 1 is now available in the canary channel, with a number of new features - a new theme editor, network and GPU monitors,  a vector icon wizard, new lint checks, new quickfixes, etc.

For more information, see the release announcement:
http://tools.android.com/recent/androidstudio14preview1incanarychannel
7 comments on original post
1

Antonio Vaccarino

Shared publicly  - 
 
 
In case anyone wanted 3d maps of the London Underground Stations (and frankly who wouldn't?)
6 comments on original post
1

Antonio Vaccarino

Shared publicly  - 
 
 
Cool smartphone accessory :) Source code seems to be public domain, hw specs CCBYSA.
exii hackberry recently declared that the bionic hand will be open sourced to speed up the development through cooperators from all over the world.
2 comments on original post
1

Antonio Vaccarino

Shared publicly  - 
 
 
Operation IceBridge has wrapped up its 2015 Arctic field campaign after covering a vast expanse of science targets during 33 different flights over land ice, sea ice, and glaciers. Take a few minutes to sit back, put on your headphones, go full screen, and enjoy a birds-eye view of a vast expanse of Greenland's mountainous region near Helheim Glacier in eastern Greenland aboard a NASA C-130.

For more information, visit: http://go.nasa.gov/1SYeGuS

Music courtesy Moby
Video Credit: NASA/IceBridge
26 comments on original post
1

Antonio Vaccarino

Shared publicly  - 
 
Very often we tell ourselves "No problem, this phone has loads of power and loads of memory", and don't get me started about browsers. Fact is, computing power and resources are often much more limited than we would like them to be.
Clients use old hardware, massive phones have limited memory for a certain task, and all kinds of stuff are going on and we have to share a machine with those things.
That's how we get blindsided when stuff slows down or breaks in the real world, or simply works much differently. It's not all about pure speed/memory saving, but that's the context for most of the issues we are going to face when our kind little idea enters the real world. 
 
I really like this article on the importance of thinking about performance during development, instead of ignoring it completely with the excuse of "premature optimization."

This is especially relevant for mobile development: performance issues that users don't even see can have negative impact on things like battery life; the resource requirements of our code has a direct impact on the hardware it requires to run well, which can completely push the product out of large markets; and user's expectations of the responsiveness of mobile applications tends to be higher than desktop applications even though they are running on slower more constrained hardware and often with much higher-resolution screens.

My own feeling on this is that as a professional software engineer, part of our job is to understand the actual trade-offs we are making during implementation.  There are many things you can do that will be significantly more expensive than other options, which really aren't worth whatever small advantages they provide.  Integral to being proficient at a language, framework, or platform is having a general understanding of the relative efficiency of the various ways you use it so that you can use that knowledge as part of the decision making process throughout development -- from design through implementation and maintenance.  That is not "premature optimization," that is making good use of your tools.

Another way to look at it is this: the hardware you are running on has a fixed amount of resources; when you are implementing your code, you are deciding how to make use of those resources.  Every decision you make that favors other things over efficient use of those resources is also a decision that is limiting the number of features you can deliver to your users, because those resources are no longer available to deliver features.  Of course this doesn't mean you should micro-optimize everything you do, but you also shouldn't ignore efficiency at all -- you need to understand the trade-offs you are making to create the best product for your users.  If you don't, there is a good chance another developer will make better decisions, and be able to developer a superior product that is able to deliver more or better features because they have a more efficient implementation without really sacrificing their productivity.

For example, there are a lot of things in the Java language that can lead to significantly less efficient results than other equally viable approaches.  Selecting between a standard or enhanced for loop can have a 3x difference in performance when iterating over an ArrayList; Java enums are tremendously more expensive in code size than simple static final ints; classes and objects have not-insignificant overhead, so if you take a very class-heavy approach to your implementation you can end up with a significantly larger code size and RAM footprint for your app.

All of these are things that you decide throughout the implementation of your app, but are very hard to fix later on.  This is not the kind of stuff you can throw under a profiler and see, "oh here is the hot spot in these 100 lines of code" and spend a day optimizing that.  Instead what you end up with is pervasive small performance problems throughout your entire app that add up to a large problem, for which a profiler will either not reveal any clear indication of a problem at all (because it is everywhere), or you will end up in an "oh sh*t" moment where you realize that fixing your performance problems are going to require changes all through your code base.

One experience that will always stick with me was when I was working at a previous company on a mobile operating system.  We had spent a few years working on it, had the system up and running on reference hardware, but were not happy with the performance we were getting.  We did a lot of profiling, trying to find what was causing it to be slow, but couldn't find anything significant.  Finally in desperation we went to the hardware manufacturer and asked if they could help out.

The answer we got back from them: "you are running too much code."  Out first reaction was, wtf, of course there is too much stuff being done, but what is it?  But the problem wasn't that there was some specific parts of the platform that needed optimization, it was that just generally all over the place the implementation was too expensive for the hardware it was running on.  It was blowing out the CPU caches all over the place, needing too many instructions given the speed of the CPU, etc.  Fixing such issues requires tremendous work across the code-base reworking how every little thing is implemented to get rid of overhead.  It is lots of steps of find 1% here, .5% there, and on and on, until you either run out of time or you eventually decide "good enough."  It is not a situation you want to be in at the end of your product development.

Our Android documentation has a lot of information on these topics for both Java and the Android framework that every Android developer should have a good understanding of: http://developer.android.com/training/best-performance.html
1
People
Have him in circles
105 people
Sergio Rizzi's profile photo
Jenna Elizabeth's profile photo
Fantastic Maps's profile photo
Abigail Sarpong's profile photo
Joseph Teller's profile photo
Gian Maria Battistini's profile photo
Studio Kulla's profile photo
Paolo De Murtas's profile photo
Steve Leon's profile photo
Work
Occupation
Programmer
Employment
  • Laboratori Guglielmo Marconi
    Developer, 2012 - present
Basic Information
Gender
Male
Story
Tagline
Programmer, former games industry veteran, casual musician and compulsive creative.
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Previously
Bologna, Italy - Milan, Italy
Links