The Semicolon Wars

This is the first installment in a series of articles that I'll be reviewing to add some content to my blog. The first article to review is going to be "The Semicolon Wars" by Brian Hayes.

The article was published in the acclaimed magazine "American Scientist".This article starts by creating a metaphor between the languages spoken in the world, and the programming languages in the world. One of my highlights of the article, is the following quote:

"That means that we've been inventing one language a week, on average, ever since Fortran."

I recommend this article if you really want to pique your curiosity start, like me, a deep dive in Wikipedia, searching for languages older than Google. One of my favorite searches was the "Simula 67" language. Which is really amazing to see. It looks like the weird son of Visual Basic with C

Simula 67 code for a Sigma function. [Thanks Wikipedia]

Real Procedure Sigma (k, m, n, u);
   Name k, u;
   Integer k, m, n; Real u;
Begin
   Real s;
   k:= m;
   While k <= n Do Begin s:= s + u; k:= k + 1; End;
   Sigma:= s;
End;

There are conventions as long as there are variants, the author mentions. I do think it is a fun and  insightful thought. Which is why I decided to do my opinionated echelon of the best programming languages (and also making other programmers mad in the process.)

Tabs vs Spaces
tabs, as tabs are resizable to each one's comfortable view. But I should probably switch to spaces, because Programmers that use spaces earn more

Naming Conventions
droopyCamelCase for all methods
CamelCase for all classes
_  for private members.
_  for spaces (javascript go away with your - )

IDE
Sublime text for life. IntelliJ and Webstorm for all other things

One of the interesting things that the article made me reflect about is Hendrik Einchenhardt's quote:

"shared mutable state is the root of all evil."
As a final note, regarding the Author's comments on Lisp.


Programs that have saved me 100+ hours by automating repetitive tasks

Along the year I've been working on several web platforms where repetitive tasks are usually the norm. From batch optimizing a thousand images, to changing from this obscure format to csv or json. What if you need to critically update a file in your client's and you aren't fancy enough to use some kind of continuous integration tool I'll give you some tips and tricks to be productive.

1. PhotoBulk

A client comes by, dumps you a folder of 10 GB of pictures in 4000x4000 and each one of them weights 30MB in JPEG format. The client needs all this images tomorrow in the webpage, watermarked and with specific names. As you mop tears from the floor, you read this guide and discover PhotoBulk for Windows and Mac

Photobulk lets you resize, watermark, optimize and rename images in bulk, or in batches. This was one of the main tools that have saved me hours and hours, so I widely recommend it. I know some of this things could be done via console, or via a photoshop action. But this is way faster.

2. Regex and Sublime Text

The same client, not happy that you took 4 hours to do the shenanigans to the images and upload them, goes and asks you to add a palette of 200 colors, given in an php array, to complete the migration of their color palette to javascript.

Regex is so powerful to create fast changes in massive data, that i've saved countless hours of conversions or friend's tasks that it is worth learning. I never understood the power of regex, until I used it in a text editor. Really amazing.

3. Coda or KomodoIDE

After uploading the pallette of colors to the website, the customer needs in a hurry to edit the website, because he added his CC number to a username field. Clearly this is trouble. Better than that, he also managed to hard code it somehow to the php code. In this client's alternative world, continous integration doesn't exist. Imagine going to a world where you have to fire up Filezilla, download the file for the code. Edit it, and then upload it. Also firing up your mySQL db manager, or console, searching the concrete entry, and changing it.

After sometime doing this, for urgent tasks in places without versioning *shudders* I've used Coda, from panic. (for macOS) or Komodo IDE (for Windows). Both this programs, allow to set up a direct FTP link and mySQL connection to a DB, where you double click the site, and you get an instant connection to the server. So you manage to control the leak of customer's data to 10 minutes because you were fast.

4. Alfred or Spotlight.

One of the tools that have saved me the most time are Alfred and Spotlight (maybe Cortana, but it is still not there). Want to open a file quickly? Cmd + Space -> file.xls . Want to do a conversion? Cmd + Space -> 100 USD to CAD or 10 lt to gal Want to do math? Cmd + Space -> (13239*(1232+24)*2) + 123 % 2


Alfred is even more awesome, you can program scripts to run or searches given certain keywords. You just get everything instantly.

5. Hazel

Now, after working 3+ years in the same computer, with multiple clients,  I despise getting it in order. So I decided that I'd get Hazel (or File Juggler for windows). Where you can create rules on your folders, based on how you want them organized. 

For example, I can create a rule that watches my desktop for files more than 4 hours old, that are screenshots, and it takes them to my "Screenshot folder", or downloads that I haven't used in more than X weeks. Or create a rule that filters out images. Or create a folder which "sorts" all the files I put into it.

But, hey, this is pretty basic.

I know this is fairly basic, but there is people who manually  does this actions, because they don't want to bother themselves with this kind of automation. Or they don't have the time to automate them themselves. So if this saves some time, I'd like for it to be useful as it was to me.

What are your 100 hour time savers?

Passive-Agressive CCing

I found this quote interesting, it was made by reddit user /u/Bytewave, he is a Senior Engineer in a well positioned Telco in Canada. He posts his stories and experiences to reddit.

I often found a hell of a lot of Passive-Agressive CCing and I find that his opinion is relevant.

“Passive-aggressive CCing (where you copy ‘important people’ who do not need to be involved in an issue to throw weight around) is one of the surest giveaways that someone is not a reliable professional and should not be trusted with anything critical. Sometimes you may get a little more attention to your issue because of it, but you’ll never be respected if you work that way. It’s not limited to IT either, it’s pretty widespread unprofessional behavior. Asking for another tech’s opinion if you think you got wrong answers is fine, but the moment you’re obviously playing the hierarchy – people remember that. Of course it’s different if it’s obvious that an issue needs to be handled by management, but if you believe that’s the case, make it the subject of what you’re writing, not a CC.” – /u/Bytewave

How I got my internship at Microsoft. ( and how to prepare for the getting the job )

Being my dream to work for one of the Big 4, since an early age I stated to learn the skill-set I'd need in order to be interviewed in Microsoft. This blog intends to be a little recap of the things you can do to make your  possibility of entering a Big 4, far greater.

Early in October, Microsoft came to my campus for recruiting. We had a very cool coding contest, and did good enough to get another interview. They also came bearing cool swag to give out to potential Microsoft recruits. (Recruiters, this makes the difference, between being another job experience or out-standing).

My team and I did well enough and we got invited to our First-Round interviews by phone.

The first round of interviews is a HR filter for applicants, for this I recommend practicing brain teasers and going through basics and methodology of standard software engineer practices such as testing and design. But the most important thing in this stage is communication. You have to prove that you can communicate well enough in a stressful job where communication in teams is essential.

Next are the technical interviews, to be honest, the technical interviews are very difficult if you have never faced problems you can't solve. They provide tough, challenging questions that brings your best form.

Basic preparation for getting your foot in the door.

In order to pass the college recruiting step, you really need to have worked in cool projects or have an internship. Some friends haven’t , but they’ve got really nice competitive programming titles. Make sure you’ve got something to be proud about, something that shows that you have a real passion for software engineering as a whole, It can be anything from a job, to a contribution to a modern framework.

High school stage.

If you are in high school for some weird reason and you are reading this, you should try enrolling into competitive programming, It will help you a lot to get you on track to be one of the best software software developers out there. It presents you with a background in algorithmic computing and in solving difficult problems while being in a time constrained environment.

Get into your local IOI (International Olympiad in Informatics) group, or seek TopCoder contests and Felix Halim’s book on Competitive programming to get started.

College stage,

In the college stage, first of all, I'd recommend to pay attention to your classes, this is the most important think I can think of, understanding of things presented in class, is often the best way to comprehensively understand algorithms and complexities.

Furthermore, Make sure not only that you "get" the things seen in class, but you have to fully understand and explore them. For example, I got a class on Hamiltonian Cycles, and I didn’t fully get what the TA was talking about until I got to code it for myself.

Secondly, I'd recommend joining an internship beforehand, or getting deep into algorithmic programming competitions (Just as in high school) so that you have the best chances of understanding C/C++. See if your school has a local ACM ICPC chapter. Don’t worry, don’t get to overwhelmed, at first you won’t understand Dynamic Programming questions with minimum spanning trees, but its important to persist through them. The most important thing here is to grasp why each algorithm is better or worse in certain situations.

Interview Stage.

In order to prepare to the interview, if you haven't done any competitive programming, you have to at least implement 3 times each type of important algorithm, (Linked Lists, BFS, DFS, etc) so that you are able to get a grasp of how they work.

The single 3 resources I found fundamental to my interview were:

  • Competitive Programming (6th edition) Gayle McDowell but be CAREFUL, don't skip the introduction and the message Gayle has for everyone. It is important, fundamental, and an often missed part of the book. Where she introduces what recruiters and companies are looking for in an software developer.
  • Gayle McDowell’s Videos on Vimeo, available for purchase. I used to be super nervous in technical interviews, but once I saw Gayle videos where she explained how the recruiting process went along, where she demonstrated  some mock interviews with random people, I understood clearly what was expected of me to know and explain.
  • Interview cake Interview cake is a resource that presents different types of common interview problems, in an easy interactive way,. This is the easiest resource for you to follow along with receptive feedback, where you can correct your train of thought, and follow the common interview process.
  • Mock interviews with your friends. At first they may seem futile or silly, but once you are on the spot, trying to explain things, your mind shifts into a different reality.

 

After all this things, remember to enjoy the experience and understand that every interview you do helps you grow as a professional.

If you want to read more things about me or contact me, you can visit my page sadacaraveo.com


Why client shaming is hurting the software industry.

When you work in the software industry, indubitably you will find the (now very famous)BOFH, and Clients from Hell material, where a  technical person complains about a client. Whether they asked for an impossible thing or software that doesn’t even make sense, the common mood (or at least what I get from them) is that the client is somewhat stupid, or short sighted. I don't want to discuss whether the clients are on the right or not, but I want to talk about the way technical people address non technical people.  

Often when non-technical clients address technical contractors, a breach in communication arises: the customer has something in mind, where they know what they expect from the system, or has an idea of what they need. Sometimes it won''t even make sense. But it is part of the job to understand what the client needs, and propose a solution to the problem that the client is trying to fix. And not to berate them for being technically unsavvy.

But what I think most people that is new to the IT and tech world seem to fail to understand is that something that a technical guy understands very easily, a non-technical person may not be even be aware of it existing. While I don't personally think it is a good thing to be non-technical-savyy in this world where technology predominates, one of the beautiful things of technology nowadays is that it is simple, simple for people to understand. 

If I hire an engineer to build me a swing, I don't want the engineer lecturing me on the strength of the rope, of the dynamic forces that act on the swing, or how the tension of the swing is equal to the weight of the person that rides, plus the angle at witch gravity pulls them. I just tell him that I want a swing in my backyard, I don't care whether it is aluminum plated rope or carbon fiber, I just want the swing for $x amount of money.

Naturally, I would expect some questions from him: 

–How many people will the swing hold?

–Three, no more than that

–How heavy can they be?

–No more than 200kg

–Are you expecting that the swing will give a full turn around the pole where its attached?

–No

And then he builds me a swing with the requirements I asked for and It is done. How is it different in software development? Well, to my view it isn’t that different. The main problem is that the client doesn’t know what variables may intervene in the process (dynamic forces in the swing anybody?) what kind of software they will need, how that technology works etc. I might even adventure that sometimes it is part of the job to be creative and design a solution. (I don’t think you need a swing, you may need a centrifuge). 

Some stories also mention that the client asks for impossible things. ( I want the swing to hold 100 tons, while on a tree branch ), but it is also part of the job to tell the client: If you want this kind of swing it'll cost you $xxxx, but you may want to use a nuclear powered swing made with carbon fiber for that.

Trying to understand what a client wants, and needs is essential to software development, and I can'tt seem to shake off the feeling that most of these Clients from Hell complaints arise from technical people not offering a solution, but focusing on the part where the client wants something and not understanding the motivations and needs of your client. 

Berating non-technical people is a huge problem we have today, there seems to be a stigma in the minds of technical people that people that refuse to see the easiness of technology today is  proof that their client is stupid, furthermore it widens the gap between technical and non-technical people and creates fear of being considered stupid, and creates trouble for our industry, where we should be open to people with great ideas and open minds.

By berating the customer we widen the gap between being professionals and being “code-monkeys”, we have to be an integral solution to a problem that the client has, we are being paid to design solutions, and not to mock people because they don’t understand how technology works.

P.S. While I believe some people berate clients, there is some true assholes out there that deserve to be scolded by being assholes to their technical people or by not paying them.

When is migrating to cloud not the best choice?

With all the new technologies emerging for cloud migration, there is a wide acceptance that cloud services are the cheapest, and best way to manage some kinds of infrastructures. Nevertheless, on the decision on wether we should migrate into cloud must still be analysed in other ways.

That's why the current Milk-as-a-Service analogy is great, as it illustrates the downfalls of moving to cloud, and the exact situation on wether you need a migration or not.

CEO: I got this proposal from SuperCloudHosting for moving our entire IT infrastructure over to them, it seems good since from what I see and what they say its cheaper and saves us the hassle of an entire department's worth of resources.

IT Consultant: But is it really the best fit for the company, its true they possibly can provide all that service to you and probably cheaper but is it good for the company?

CEO: I don’t have a really good grasp on the technology they are offering but it seemed pretty thorough and they explained the cost effectiveness as a by product of economies of scale, the exact quote was something like "IT is like electricity, why buy your own generator when you can just use the powergrid?"

IT Consultant: I wouldn’t exactly use that as a good way of explaining cloud computing solutions. A better example would be to imagine IT services as milk and IT infrastructure as a cow.

CEO: Milk, cows?

IT Consultant: You use milk every day in your tea or coffee but where do you get it. You can get a whole cow and just use that to get your milk but its far cheaper and more convenient to go buy milk from a store for that. Now if you have a large family, say a wife and five kids then it’s still cheaper to get your milk from the store even if it’s a bit more than just for yourself.

But if you are talking about a whole village then owning your own cow or herd of cows suddenly seems better than buying store bought milk, the cost may still be lower for store bought milk but you have to ensure a large supply of milk consistently over relying on a store or external supplier who may suddenly shutdown or decide that they want to sell bread or something.

CEO: I see… so how does that apply to the cloud and our company?

IT Consultant: Right now you are the village, you can afford to keep your own cows or buy the store bought milk but remember you have no control on the store milk beyond buying it. Their cows could die, they could decide to water down the milk to save costs, increase price, etc and you could do nothing or little about it except trying to yell at the store to bring your milk. And leaving that store to a new one who can supply the same quantity is sometimes lengthy or impossible.

With your own cows you have your own people milking them, caring for them and you know exactly what you have and the fate of your milk is entirely in your hands. My job is to analyze and recommend whether its safer to rely on your own herd of cows or rely on the store always being able to get you milk even though the store is cheaper.

CEO: I see, so outsourcing our IT infrastructure is cheaper but has considerable risks than keeping it in house since it hands our business continuity fate to an outsider beyond our direct control? Kind of like putting all your eggs into a basket you don't even own since you want to save on buying your own basket?

IT Consultant: Exactly.

It is specially interesting to consider that the scale of your operations is something to take into consideration when evaluating cloud services.

I want to give props tu /u/the_walking_tech from reddit for coining the term MaaS.

  • LikeWhen is migrating to cloud not the best choice?

  • Comment

  • ShareShare When is migrating to cloud not the best choice?