Alcides Fonseca

40.197958, -8.408312

Catching the Java Train

If you are into Node.js, Elixir and all those new cool tools, you might have not heard of Java. Java is a bloated language and runtime from the 90ies that is used mostly by your bank.

Java has been loosing adoption because it has not been up to date with features that developers want from a language. Specially compared with its evil twin, C#/.NET, that has been the recipient of several new and awesome features, driving innovation in the ecosystem (LINQ, Type Providers, etc…).

They have now announced that Java will follow the train model of Ubuntu: a new release every 6 months with whatever’s ready at the time, and a LTS (Long-term-support) release every three years for enterprise customers.

This is they response for having the same product for both enterprise and new kids. My opinion is that they are hiding from the truth. Java8 was delayed until Lambda was ready. Java9 was delayed until Jigsaw (module system) was ready. I believe they took the right approach. Except I would have released Java7.1 and Java8.1 with some new stuff that was ready before the main incomplete feature was. The real problem here, the one they are avoiding, is that it took them ages to develop and mature both Lambda and Jigsaw (and at least on the Lambda part I think it was really incomplete).

The enterprise world was mostly OK with not having nor Lambda nor Jigsaw at the predicted time – they do not care. They may have been annoyed for waiting so long for security updates that were waiting for the main feature. Something that with my minor releases would be fixed easily. This is what happens with other Open-Source languages such as Python or Ruby.

The main problem is that the new kids were missing these features and switching to Scala, Groovy, Kotlin or whatever was trending at the time on Hacker News. So much that Google accepted Kotlin as an official Android language, which IMHO sucks for Oracle. But Oracle has made it clear that they do not care about the success of Android. And changing to the train model does not fix this type of problem. If the main features will be delayed, developers will not care about it if they have better usable alternatives.

So, dear Mark Reinhold, I believe this is more of a marketing stunt than actually solving the real problem: JDK development is slow as hell.

And I’ve experienced this first hand: I joined project Sumatra to bring GPGPU to Java, which I first did via the AeminiumGPU project. However, no one in the JDK team made this an effort. AMD tried to bring the Aparapi, but the lack of efforts from the remaining members lead the project nowhere. Even the prototype source tree was abandoned.

I believe the main reason is that despite Java being Open-Source in theory, it is not. It is a Oracle-controlled environment. Python has advanced much more in the same years being completely open-source (despite some investments from Google and Dropbox, among many others). Python does not need the train-model: it has a bleeding edge version in 3.6 (or whatever 3.X we are in right now), and still has 2.7 (or 2.6 if you are lazy like me) running fine in many servers.

Train model is not the solution: a better (and more open) development process is.

Ads:

Killing apps on iOS

The single biggest misconception about iOS is that it’s good digital hygiene to force quit apps that you aren’t using. The idea is that apps in the background are locking up unnecessary RAM and consuming unnecessary CPU cycles, thus hurting performance and wasting battery life.

That’s not how iOS works. The iOS system is designed so that none of the above justifications for force quitting are true. Apps in the background are effectively “frozen”, severely limiting what they can do in the background and freeing up the RAM they were using.

John Gruber at daring fireball

I really hate to see smart people making this mistake. But it’s understandable how Gruber, always owning the last iPhone models feels this way. Let me introduce you to the cheap iPhone owner.

I have owned a 3G, a 4 and a 5. Usually I buy a new iPhone every two years, like it’s supposed to, but I am cheap and I buy the iPhone that was launched two years before the current one (eg, the 6 came out and I upgraded from the 4 to the 5, complaining about how much bigger 5 was). Right now I am still rocking the 5, despite its slowness.

On today’s iPhone 5, I need to kill apps that I am not using. It does make my phone faster. I can’t really measure it, but at the end of the day I can end up with 16 open apps, and I don’t have that many apps because I am limited to 8GB and I also want my music there. Of course, if I am opening that app in the next hour, I won’t close it, but there are several apps you use once a day or even less often.

So Mr Gruber, if you have a really old iPhone (it’s more common outside the US and other countries with good plans) and it’s slow as hell, killing apps you won’t use in the next hours does make your iPhone snappier.

Receita para equilibrar a balança fiscal portuguesa

O segredo desta receita está no primeiro passo que é genialmente o oposto do esperado. O segundo passo atrasa a resolução do problema para o próximo portugal2030.

1. Aumentar os custos
2. Usar os fundos europeus para pagar esses custos (e outros que já tínhamos) a curto prazo.
3. A balança está mais equilibrada do que estava. PROFIT!

Ora, o que acontece quando a duração dos fundos europeus para estes fins acabar? O que acontece quando o financiamento dos doutorados (por exemplo) acabar, e eles já tiverem nos quadros? Quem vai pagar os ordenados deles? Claramente não são as universidades que já não têm dinheiro para nada…

Legacy Operating Systems are still alive

In response to yesterday’s cyber attack, Microsoft released security update for expired OS versions.

Of course, several corporations are still on Windows XP/2003 server, and are not willing to pay for custom support. Nor they are willing to update their software.

Frequently, I see big institutions asking for budgets for software systems, but they do not care about maintenance or continuous development. And this is what happens in those cases.

A rant about Eduroam

Eduroam is the European university network system that allows me to authenticate in any university with the email provided by my current (or former) universities.

While this sounds like a good idea, I would rather have open wireless all around campus. Here are a few scenarios that would be improved:

  • Future prospect students come to visit our campus. They do not have internet access.
  • There is an international conference with several non-European scholars visiting. They do not have internet access.
  • There is a local conference with industry members. They do not have internet access.

Just like Public University libraries should be open to the general public, so should be the internet access (and the publication access it provides). Requiring authentication prevents several people from accessing useful resources. And having a guest username and password (common solution for events) is troublesome and has caused me problems in the past.

Besides the obvious blocking an user even if they are randomizing MAC addresses, what is the advantage of authentication in universities’ networks?

Macbook Pro with TouchBar

Following on a previous post I have used 3 macbooks over the last month. The screen of 2011 macbook air died, and it was converted into my desktop at the new office (I am now with the University of Lisbon). Pretty much like Pedro Melo, I ordered a new Macbook Pro with Touchbar, but because I always max-out the RAM (blame dockers and VMs), I had a 3 week period with no laptop.

While I understand Apple’s desire to have 8GB as the default value for RAM due to energy consumption, it should not consider a custom model having 16GB on its high-end 13’' macbook pro. Luckily I unshelfed my dear 2007 black macbook to keep going to meetings and teach classes in the meanwhile. I would not spend 1000+ euros on a 8GB machine in 2017, let alone the 2000 they ask. On a side note, if I wasn’t expecting this new machine to last 5 years, I would have gone with the previous Retina Macbook, which was ~400 euros cheaper, with more or less the same specs. The main difference: USB-C.

When USB-A was introduced, it looked like a great solution. Specially because it was the only solution at the time and all vendors adopted it pretty quickly. Then over time, USB turned out to be 16 different things, which disappointed many users who had invested in USB-mini when USB-micro became the default (and EU) standard for phone chargers. Then there was 30-pin and lightning, thunderbolt 1 and 2.

I’ve decided to invest in USB-C, but I know the risks:

  • It will take at least 5 years for old-style USB to go away in external devices (Think keyboards, mice, pen drives, external drives, and many other esoteric peripherals).
  • I would have to spend money on dongles, either on duplicate or carry them with me at all times.
  • Everything USB-C is more expensive, due to technology licensing.
  • Within 5 years, USB-Z will probably be out and outdate everything USB-C, making my choice useless (what I call technological serendipity).
  • USB-C is no standard, its a connector for several standards, such as Power transfer, Display-Port, Thunderbolt 3, PCIe, etc..

My main concert is the combination of the two latest. When someone buys a USB-C cable, they are making several decisions: does that cable include power? Thunderbolt? Displayport? Which version of Displayport? This cable nightmare is already here, and I fell for it. I ordered a USB-C to Thunderbolt2 adapter, hoping it would work with my mDP-HDMI, mDP-VGA and thunderbold2-ethernet adapters. But this adapter only works with Apple’s displays. The cable does not support miniDisplayPort at all! I had to return it.

Overall, I ordered the following adapters with my macbook pro:

  • Apple USB-C to USB-C cable and Power adapter (came with the laptop).
  • Apple USB-C to VGA+USB-A+USB-C to take with me for classes and presentations.
  • Apple USB-C to HDMI+USB-A+USB-C for my home monitor, keyboard (which connects to my mouse), and power connector.
  • Apple USB-C to USB-A because I always like to have one official connector for devices that need their own port (External USB-3 drives).
  • Griffin Breaksafe – This replaces Apple’s cable for the power connection with magsafe-like capabilities. There are other brands with the same magnetic cable, but most of them have really low build quality. Even Griffin’s has connection problems (on the other USB-C side, connecting to the charger, not the magnetic connector). The end that connects to the macbook is really wide, which only allows for apple adapters on the adjacent port (this would suck if I have the non-touchbar version). I am not convinced with this cable, and I will only use it when I’m on the sofa or bed. By the way, it does not work with 15’’ macbook pro.
  • Dell WD1 dock with 2x USB2, 3x USB3, HDMI, mDP, VGA, Ethernet, Audio output and Audio in/output.

I considered ordering a second charger (I like to have one at home and other on the office, so I don’t have to carry it with me) and a usb-c to mDP adaptor, but the whole dock came at the same price. I haven’t received it yet, so I cannot attest for its quality. I really prefer to use display port over HDMI. Using HDMI on my my Dell U2414H shows little horizontal waves, while mDP works perfectly. It reminds me of the quality difference of DVI over VGA several years ago. Now I can finally have two 1080p external screens along my macbook. Something I could only achieve with a usb-3 to HDMI converter that my USB2 Macbook Air used to lousily drive a 17’' external screen.

And driving two screens was the reason I chose the touchbar version. While two ports can be multiplied with daisy chaining and hubs, the bandwidth available is the same. Just like several USB devices (either because of power or bandwidth) like external drives and chargers cannot work on the same hub, I’m not betting all my technology 5 years from now to be connected to just two ports. It was an annoyance on the Macbook Air, and even that model and another Thunderbolt2 port for the screen.

I understand the future is bluetooth and wireless. That might now be true for keyboards and mice, but I do not buy it for external screens, GPUs (I intend to buy one as soon as I get funded) and external drives. I am more comfortable investing in 4 expendable ports. After all, it is the main problem with current Apple machines: lack of expandability.

What really annoys me is the touchbar. As a general concept it is stupid. I will have the touchbar on my laptop, but not on my external keyboard or desktop machine. I pay for really-expensive Apple keyboards just to have the same feeling on all of my keyboards. But this is nuts! On a practical level, it is even worse. After 2 days, I had to configure the touchbar to have the same buttons that exist on a regular keyboard. I really don’t look at the keyboard at all while I work, and the colored tabs on safari were distracting. The worst part is the lack of physical touch. I have large hands, and I’m used to have my fingers on top of keys ready to press them when the time comes. On the touchbar, if you have your finger on top of it, it is pressing the key. I am trying to adapt the way I use my computer, because I am always pressing either ESC or F1. And if you are working in Vim, or you have modal dialogs open, pressing ESC unintentionally is rather annoying.

Overall, I am really please with the machine, but the main different for my 10-year-old black macbook is its snappiness, the screen quality (which is not that important to me, because I’m always on external screens) and the stupid touchbar. Maybe if homebrew supported OS X 10.6, I would keep working on a 10 year old machine. Processors have not evolved that much over the years, software has, and not on a good way.

Computing has not really evolved in the last 10 years

This year is the 10th anniversary of Take Off, a conference about innovation and entrepreneurship in tech. At the time, the Startup movement was growing in Portugal and several small companies were being started at the time. Some of them are no longer active, but that entirely fine. Nowadays the startup community is well established and there is plenty of funding for testing your business idea.

On the computing side, we now have Machine Learning, Deep Learning, cloud computing and raspberries pi almost for free. This is a fantastic time to be a computer engineer. Yet, I am disappointed for what we haven’t accomplished in the last 10 years. My main concern is the way internet services have became closed silos.

Most people have data on major sites like Facebook, Google and others. Sure Google allows users to export their data but the main problem is that people have their services at these sites. If I want to contact my Facebook friends, I have also to be on Facebook. This service lock-in results in the following 2017 chat service problem:

Almost 10 years ago I was dabbling with XMPP which was a protocol designed to support federated services. A Google user should be able to talk to a Facebook user or anyone who would run their own XMPP server. Just like you are able to call numbers on other mobile networks. Google dropped XMPP support on Hangouts, replacing it with a binary alternative citing performance issues (despite binary XMPP). Facebook deprecated its internal XMPP API. Microsoft removed the interoperability with other chat services. Now I am stuck with Facebook Messenger, Skype on all of my machines, Slack on my work laptop, Whatsapp, Telegram and a few others on my iPhone. I miss having everything on Adium.

The solution for aggregating messenger services is Franz. While Adium was a native app, Franz is a electron app which is a webkit wrapper around the web version of each platform. Nothing more than a chromeless browser with tabs. And this is representative of the way desktop computing is heading: apps are being written in web technologies for portability, and being wrapped in electron for desktop apps.

Here is a list of services I use and desperately need a native version:

  • Slack
  • Visual Studio Code (I am still relying on good old Textmate, but miss plugins for recent technologies)
  • WhatsApp
  • Messenger
  • Spotify
  • Jira

Maybe I am really old-school in my preference for native applications, that feel responsive, integrate well with other apps (drag and drop is a pain) and that boot in no time. Oh and that work offline, which is something most of them do not do.

I applaude Apple and Microsoft efforts in continuity between mobile phones, tablets, pcs, tvs, but application makers are not following suit. I still receive plenty of duplicated notifications across my devices and I cannot pick on one computer what I was doing in the other. Which sucks for my two-laptop system nowadays. But I’ll leave that for a second post.

Phones, Emails, Domains and how to identify yourself online

People don’t own mobile phone numbers. They are rented from mobile operators. Yes, you may be able to move “your” number between a limited set of providers – but it ultimately doesn’t belong to you. An operator can unilaterally take your number away from you.

Your domain is only temporarily leased from your registrar. Perhaps you forget to renew your domain. Or renewal prices will jump and you can’t afford your “home” any more. Perhaps a global corporation insists that they alone have the right to use your name and take you to court.

- Can I own my identity on the internet by Terence Eden

Self-taught developers

Source for first website – table based layout, a lot of view source, a lot of Notepad, a lot of IE 6. Used to work mostly in HTML and CSS. With the help from books like “HTML for the World Wide Web – Visual Quickstart Guide”, learned a lot as a tinkerer.

Two years in: good with HTML (table layouts) and moderate CSS (fairly new), basic PHP, could use FTP and do basic web config. Could get a site up and running from scratch. This was enough to get my first developer job. This was without any computer science background.

Now: front end developer with 10 years experience, not an engineer, or a code ninja. I don’t know Angular, React, WebPack. I don’t even know JavaScript inside out. I am valuable to my team. Need more: empathy, honesty, being able to see stuff from a user’s perspective.

Self taught developers today, via Tom Morris’ live blogging.

Back in my day, we learnt how to do things. Nowadays, kids learn how use high-level APIs, without any idea how things work underneath. They might learn Meteor, but have no idea about HTTP or Sockets or how HTTP Sessions are implemented. Which is fine for developing tiny little apps, but they miss the I understand all this sh*t feeling.

Supposedly high-level frameworks allow developers to write more complex programs in the same timeframe. However, I don’t believe this is true for small projects, because the setup time is increasing exponentially. Let’s start a new single page app, what do we need? Node, npm, webpack, angular or react or any other trendy framework. Say what you will about PHP, but it was a single one-click WAMP install away from your fingertips.

If you were a 13 year old kid wanting to develop your own app, what would you use?

Miss Peregrine's Home for Peculiar Children

The movie was so-so, but the time-travelling make no sense at all. Which means the authors do not care for geeks at all, because we all know how we love the logic used in made up scenarios.

Instead of listing how it does not make sense in this movie, I’ll just link to jws, who did the job for me.

But Eva Green is still hot as hell.

Devfest Coimbra 2016

Coimbra has been hosting several small but interesting events lately ( #1, #2 and #3 ) and one of the organizations behind most of them is the Google Developer Group, of which I am a mostly inactive member.

Google Developer Groups (GDG) are community-run independent groups, which Google sponsors in different ways (mostly event support and some gadgets). Since Google has no client support, nor developer evangelists in most countries, they outsource that job to the community for a very very cheap price. GDG organizers are people who would do something similar anyway, but use Google’s support to bring experts from other countries at a cheaper price. More later on this model.

Google has a budget for certain events, and this late in the year it was time for Devfest. In Portugal, each of the three big cities hosted one. I attended the Devfest Coimbra, and I was surprised how well the team pulled this event together in so little time.

Having a sponsor in Google (and many other local and international companies) allowed to bring people from outside Coimbra, resulting in a speaker lineup with only one local speaker. This is uncommon here, as we usually have local people presenting on technical subjects, given our rich talent pool.

There was a main track with talks, and a secondary track with hands-on workshops, which allows for a diversity that our typical events don’t provide. Almost half of the time I was in the third track: the hallway track.

Developer Stories – José Nunes talked about his two man maker company that builds custom drones. Although there was no business plan talk, he gave an overview of the drone scenario nowadays and projects they are exploring.

Filipe Barroso gave the most confusing talk about git ever. He seemed like he was targetting an audience that knew nothing about git, but expected them to know how it worked from an user point of view. He explained the blobs, commits and objects that are used internally in git, and tried to explain the merging algorithm, without going into details. He should have sticked to one level (beginner/intermediate/expert).

Progressive Webapps with Polymer – This talk had a similar issue. The speaker expected people to already know polymer, which was far from the truth. Thus, there was a big downtime installing polymer (about 45 minutes). Speakers should have access to the profile of registered atendees, in order to better prepare their talks/workshops. Additionally, pen drives with offline installers is also a must for workshops.

Celso Martinho expanded his lessons learned talk from take off with his new job at Bright Pixel.

Finally, Luís Silva gave a ballmeresque motivational speech about having a wonderful job that allows us to put our art in the hands of everyone on the planet. He also talked about his company supporting the code.org in two schools, something I’m a fond of.

Overall it was a good event (free food!). I think better speakers could have been found for some topics, but I’m also to blame, because I was asked for suggestions. Additionally, there should have been beginners/intermediate levels in the talk description.

Finally, while this was not a google tech exclusive event, there is an incentive to organize events around their technology. GDG groups should not have Google in their name, and IMHO they should organize any type of event, and Google would support the ones they have interest in. But giving themselves the GDG group associates them with Google for good and for bad.

Awake

Wonderful ad showing how much we are ignoring our surrounds, even if we believe deeply that we are not.

By the way, have you checked the SUR-FAKE project?

On Apple's innovation

Regarding the new Macbook Pro with TouchBar™, I would suggest you reading the review of the old retina macbook pro as if it was the new version. It looks so believable that it scares me. But I have some points to add to all the reviews that have been made.

First, despite needing an upgrade on my 4GB-RAM 2011 macbook air, I’m not leaning towards the new touchbar mbp. And I don’t known whether the fn-version can have the same specs maxed-out. My issue is that this is the first implementation of the touchbar. Within two revisions, the touchbar will be larger and it might go around the keyboard. Apple usually improves on the technology for these thingies, like they did with the iPhone and iWatch. Which will result in developer nightmare, just like when they introduced different iPhone sizes and resolutions. Secondly, this hardware will not be compatible with Linux, so you are effectively locking yourself to a macOS system, because no one in their right mind would use Linux without the function keys.

The other issue is the lack of headphone port on the iPhone. I have the 2011 mac and a 2014 iphone 5, both which have headphone jack issues. I connect headphones to my mac almost daily and two to four times a day I connect my car AUX cable to the iPhone. This has ruined the jack, and I need to twist the end of the cable to get stereo and microphone. And not all apple phones will get me microfone, it’s a gamble. So while I appreciate having the port for some unexpected usage (such real audio recording), I understand apple’s forced recomendation to stop using cables, specially if they cannot guarantee that they will work for 6 years (what I expect from them).

Finally, I am gonna miss mag-safe. Together with the touchpad it’s the two best things that came out of Apple. And I understand they want to go to the standard solution, but is it really a standard?

The core issue with USB-C is confusion: Not every USB-C cable, port, device, and power supply will be compatible, and there are many different combinations to consider. The newest, most full-featured devices (such as Apple’s brand-new Touch Bar MacBook Pro) will support most of the different uses for the USB-C port, but typical older devices only support basic USB 3.0 speed and (if you’re lucky) Alternate Mode DisplayPort.

Sobre a licenciatura do outro

A lista de governadores com falsas licenciaturas foi extendida recentemente. Rui Roque terá apresentado um documento com a média de curso, mas não necessariamente comprovativo de que a licenciatura estaria concluída. Tanto é ridículo do lado dele, como de quem verificou os documentos.

Mas do meu ponto de vista há uma terceira identidade que esteve mal nesta história: a Universidade de Coimbra. Citando do Observador:

Contactada pelo Observador, a Universidade de Coimbra escudou-se nos regulamentos, explicando que a universidade “não pode fornecer informações sobre os seus estudantes e antigos estudantes” e que “a única coisa que pode fazer é validar documentos oficiais, como sejam diplomas emitidos pela UC e confirmar ou não a sua veracidade.”

Que a UC se esconde atrás do regulamento não é novidade nenhuma. É prática normal na sua relação com os estudantes, mesmo quando o regulamento não faz sentido. E parece-me ser o caso. A UC deveria publicar uma listagem dos diplomas atribuídos assim que os alunos terminam o curso. Esta informação em universidades públicas não deveria ser escondida. Acredito que os docentes da universidade deveriam ter orgulho em disponibilizar esta informação, e não vergonha como acontece em casos onde os alunos terminam o curso sem o merecerem, por diversos motivos. E assim não haveria dúvida nenhuma de quem tem uma licenciatura ou não.

Mas a minha sugestão vai mais adiante: disponibilizar a listagem de alunos que concluem cada curso, com a média final e, ao estilo americano, o primeiro empregador assim que possível.

Do lado dos alunos, haveria um incentivo para terem a melhor média possível, para que os empregadores (que certamente iriam olhar para essa listagem) olharem para eles primeiro, antes de outros. Do lado da universidade, a informação dos primeiros empregadores incentivaria potenciais candidatos a ver a empregabilidade do curso.

Falam em transparência na administração pública, Open Data, e outras coisas. Mas nem as universidades, onde a investigação é feita, dão esse primeiro passo.

Pixels.camp voting

For those of you who don’t know, Pixels.camp is the largest geek event in Portugal, the follow up to Codebits. I love the event and I have given talks in previous editions.

The major component of the event is the 48h hacklathon. Participants team up to make any project they want, building up to the 90s pitch. During the pitches, participantes in the audience are voting for the project with a like or dislike.

This is actually a hard task, as authentication is required (to prevent people who are not in the event to vote) and not all the projects get the same number of votes.

So far the organization has used the likes – dislikes as a metric for ranking projects. Marco Amado proposed using the ratio of ( likes – dislikes ) / ( likes + dislikes ). I do not believe this is fair because a project with 5 likes and 1 dislike, ratio of 0.(6), would rank higher than a project with 100 likes and 25 dislikes, with a ratio of 0.6. I would consider the second project to be better, even if only by causing more positive interest. Using just the difference is more interesting in my opinion.

However, I agree that it is a flawed system. I end up dislike every project that, according to me, shouldn’t win a prize. This decision is based on hunches, because voting is real-time and the first projects always end up having higher rankings because there is no comparison at the moment.

My suggestion is to change ranking to have two different votes: like and love. Likes would work like Facebook likes: they would be used to increase the project author’s ego. Loves would be used for the final ranking, unlike likes.

Each user would be given 100 votes, which would be equally divided across their loved projects. Then it is a matter of making the math and ranking the projects.

This approach keeps the simplistic approach of binary voting, it takes into consideration how many votes there are, and it has the advantage of not having dislikes, leading to an happier event!