Thursday, December 18, 2014

Google wants to warn you every time you use HTTP instead of HTTPS

So recently, Chrome developers have been floating the idea that the UI should post a security alert every time the browser visits a page that isn't encrypted. According to the BBC, currently only 33% of  websites use HTTPS (encryption). I suspect in actual practice the number of websites that are still using unencrypted web connections is much higher. This would mean you'd be getting many security alerts in practice.

I am all for more encryption. There are far too many parties out there who have something to gain by snooping your connections. Every time I use an strange WI-FI hotspot I worry about who is listening or how they might modify my data.

Many think this is all theoretical. That no one really cares about your data so unless it's something like banking data then it doesn't matter. Nonsense. Dangerously so. You're not up against humans you're up against software and with software you're never too small to not matter.

Consider that the WI-FI hotspot might be inserting ads into web pages you're looking at. Comcast has been caught doing this. This is annoying and potentially misleading because now you can spam ads and the user will think it's coming from whatever website you're using. Hopefully they didn't make a mistake or the page won't show up at all. What about replacing existing ads with your own? Too bad for the original web site trying to make a living. What about inserting a tracking ID so you can be followed everywhere you go?

What is the ISP doesn't think you should be watching youtube?

And these are the corporations. Nasty people on the internet can  snoop on everything that goes over an unencrypted connection. Much of it can be used to fool support and steal domain names or accounts because why not? .. to say nothing of identity theft. How much of yourself are you giving away each time you log into facebook?

Then there's the government. Whether you're liberal or conservative you can bet there's someone who disagrees with something you're doing.

Many websites have encrypted versions of their site. However it can be painful to figure out which sites have an encrypted version and to manually switch over. This is where HTTPS Everywhere comes in.

HTTPS Everywhere is a Firefox, Chrome, and Opera extension that encrypts your communications with many major websites, making your browsing more secure. Encrypt the web: Install HTTPS Everywhere today.

HTTPS Everywhere is a browser extension that contains a database of web sites that have encrypted versions and automatically redirects you to the encrypted version of the site without you having to worry about it. This gives me some piece of mind when I'm using public WI-FI hotspots. It's not perfect but it's the best we can do until all connections on the internet are encrypted.

.. and they will be.

Wednesday, December 10, 2014

I Found a Good Headset

Those with long memories will remember that I have been looking for a good circumaural headset ever since my Plantronics 655 headset died.

The Plantronics 655 was never the perfect headset. Its ear cushions were too small and rested on your ears so that they would become uncomfortable after wearing them for a long time. Just about every headset has this problem. I was pleasantly surprised to find that the KOSS SB45 doesn't. Its ear cups are large enough to go all the way around the ears so I bought a pair. I am very pleased with them.

My only complaints are that they exert slightly more pressure on the sides of my head then I'd like and that they don't do whatever magic the Plantronics 655 headset does to let you hear yourself when you're on Skype.



Let me explain, you know how when you wear a headset you can't hear your own voice very well? The 655s play your own voice back to you so you can hear yourself. Since you can hear yourself you don't feel the need to shout. I'm actually surprised since I thought it was a feature of Skype but it works with the 655s and not the SB45s. It looks like some sort of device level feature. It's really useful and I miss it.

Apart from that the KOSS SB45 headset is very comfortable, has a good mic, good sound, inexpensive and I would recommend it.

Monday, December 8, 2014

Space Smilies now on Google Play store

Well, I've released Space Smilies to the Google Play Store now. Go download it! Have fun! Give feedback!

My plan for the sabbatical was to release two video games. The first was this one. I figured it would take about a week to get it ready for release. If I hadn't decided to change things that would have been a realistic estimate. Instead I decided to clean up the Space Smilies movement, add levels, add a level editor, redo the graphics and things like that. I figured with all that it would take a month. It took about 4 months. This plus a bunch of other demands on my time mean that I'll probably not get to do the game and game editor I wanted to.

Ah whatever.

I have other projects to work on. In fact, it's quite hard to set priorities. Part of the problem with deciding on what project to undertake is that it's not clean what's worthwhile unless your part of the conversation. That and Myster  set the bar for success really high. We would get 10000 downloads a day when we released a new version. Most days we'd only get 300 downloads. That's still impressive. It would be even more impressive if I hadn't made a bunch of newbie errors early on in my installers that made most users simply not able to use the application on Windows. Painful doh!

Every field has a conversation. If you're a Starcraft player you can think of it as the current state of the meta game. It consists of what is known, what is done, what needs to be done and what is not worth doing. Actually, it's more complex than that includes all the little arguments that are in progress and all the relationships, camps and tribes that are squabbling at the moment. I used to be very connected to these things but some of the conversations have moved in 10 years.

Games and indy gaming especially. The tools available to modern indy game developers are impressive. Part of me is saddened by the fact that application development frameworks are no where near as good.



This means that creating a game is much more about learning the tools than learning exotic programing techniques. I'm not sure I want to bother to learn a tool whose sole purpose it to quickly make top scrolling video games. I would love to WRITE such a tool. In fact, that was kind of the idea, but it looks like I am 5 years too late there.

Doh. That's what happened when you don't pay attention.

Oh well, I'll figure out something. Stay tuned. :-)

Wednesday, November 26, 2014

Android API First Impressions

I've recently finished my game and have started porting some of the Android only sections back to JavaSE. I have been struck by how everything seems so much easier with the Android API.

I find this very surprisingly. I've been using Swing for a very long time and have gotten good at doing crazy things with it. Even with my knowledge of Swing tricks and hacks it's still easier to do things on Android than Swing.

Take, for example, layouts. I've gotten to the point with Swing where I just use GridBagLayout from the start. I've got my own utilities that makes using GridBagLayout much less painful than it ordinarily would be. Gridbag is surprisingly flexible, if you've managed to survive its brutal learning curve. That said, doing layout with Android's isn't too bad. I certainly didn't have the parade of WTF moments that I experienced trying to wrap my head around Swing's layout system. Android also has the advantage of coming with a GUI layout editor. It means you don't find yourself blindly changing values and recompiling/relaunching every time to see if the changes did anything.

Then there are things like how do you make all the widgets translucent with an animated background? With Swing, I had to use the arcane knowledge I've discovered in my 10 years or so working with it. With Android it's just a property on the view or layout. Golly, that's convenient.

What about have multiple layouts on the screen at the same time and showing/hiding them like cards? With Android it's that way by default. With Swing it's a weird system of content panel layers or you can use CardLayout. Either way it's which is full of the usual Swing WTF moments: I have to do that to show a "card"? JLayeredPane is where?

Events are handled nicely too but to be honest, I was hoping for more here. Swing's event system is actually not too bad. Android's is very similar but also offers additional flexibility: you can define your event handler method directly in the layout. This is cute but this won't scale well if you have a fairly complex Application. That pretty much sums up my feelings towards Android event handling: It's good and tries to make things really convenience but the convenience comes at the price of preferring and unscalable application architecture.

Well, I say that but Android's encourages an application architecture that segments large applications into multiple activities which would help with scalability a great deal. I don't know how these two conflicting factors work out in real applications but I'm certain that either way there's more than enough flexibility in the approaches you can take to make everything work.

So, in conclusion, my experience with Android's APIs has been quite positive so far. I'm looking forward to more.

Tuesday, November 18, 2014

Agile

Whenever I hear someone start to talk about Agile methodologies I start to worry because, while the industry has agreed that Agile is the way to go, Agile is often misunderstood.

Agile is often sold to management as a way of getting better quality software faster, with fewer bugs showing up in the field. Well, that might happen as a side effect but Agile is really about being flexible. Change is a big problem on any engineering project. With most engineering disciplines change is very often fatal but at least it's easy to understand why. If you design an engine for a car and it doesn't fit, you're basically screwed. This is where the saying "measure twice cut once" comes from. With software it's not as obvious sometimes why a change would be particularly difficult because software is just a bunch of instructions. Just change the instructions! Duh.

It's never that simple. Software isn't constrained by the laws of physics. As a result, software projects have a tendency to grow in complexity until they become unmanageable. A typical project is a tangle of inter dependencies. Some of these dependencies are design assumptions, some of them are organizational assumptions - like budgeting and estimates. For example, if you write a piece of software for a desktop computer and find out that it really needs to run on a smartphone, you're basically screwed. It's doesn't matter that it's software.

Agile methodologies are a series of mitigation you build into your software and organization to make it resilient to changes during development. Those changes can be discovered difficulties or they could be mistakes.


In order to get into the Agile mindset you must first be convinced that planning is pointless. That the world is too full of unknowns and surprises that trying to plan is like putting on a contact lens in the middle of a sandstorm.

Basically,

  1. Your time estimates are random numbers
  2. The man in charge of the requirements is a raving madman
  3. The chief architect has some kind of dementia
  4. What you're trying to build might be a logical impossibility anyway
So what does all this mean? It means you can't rely on estimates, the requirements still need to be discovered, you're going to make mistakes at the design phase and the whole thing might be a waste of time anyway.

In other words, it's a typical software project.

The only one thing you're not allowed to assume is that your programmers are idiots or are evil. If your programmers aren't excellent, trustworthy professionals then you're doomed no matter what you do. You might as well go outside and play Frisbee all day. You'll fail either ways but Frisbee is more fun.


Agile mitigation consist of things like this:
  • Chopping the project into many small pieces
  • Prioritizing these pieces with the goal of getting something useful quickly
  • Doing each piece one at a time; avoid over-design - YAGNI
  • Giving this "something useful" to the customer and finding out if you're on the right track as soon as possible
  • Re-evaluating the priorities of these pieces every day as new information is discovered during development
  • Pushing decisions to the edges of the org chart (developers or other) to allow developers to solve problems without a heavy vetting process (self organizing teams)
  • Lightweight, flexible and adaptable process - one that allows people to adapt to changes
  • Improve communication channels between people (co-location, burn down charts to track progress, bug database, unrestricted channels (anyone can talk to anyone else in the organization))
  • Techniques to write maintainable code. Unmaintainable code is by definition hard to change.

My key point is that Agile methodologies don't make change free. It doesn't make software development magically faster or higher quality. It's all about being flexible and mitigating the damage done by routine changes during software development.

Monday, November 17, 2014

Headsets and things

A little while ago I wrote a blog post about replacing my Plantronics 655 headset that had recently stopped working. Well, I spent a great deal of time searching for a good replacement and eventually came to the conclusion that there aren't any good headsets out there. Every single one of them has issues. Either the headset ear cups are not large enough, or the mike doesn't work very well or worse.

Razer Kraken USB isn't too bad. I didn't like the circular earpieces. They were too small (5cm) and the wrong shape. Ears aren't circular, not sure why they were with circular ear cups. Most of the reviews complained they fit funny.

The Steel Series headsets had terrible microphones. I like Steel Series as a company. My mouse is a steel series XAI but I would be embarrassed to use such a terrible microphone.

The worst, however, was the Sennheiser headset. Sennheiser has a fantastic reputation online. So good in fact, that when I found a pair of  PC333D G4ME going for cheap I bought them right then and there. They are normally out of the price range I would spend on a headset even with the sharp discount I got them for so I was hoping they would be amazing. Nope. Crushingly disappointed. Literally. They actually crushed my head with such force I couldn't wear them.

Have you even been back to an elementary as a grown man and tried to sit down at one of those tiny desks. That's pretty much what it felt like trying to put on the PC333D G4ME. I should point out I have never had anything close to this experience before. All headsets I have ever tried fit nicely on my head with plenty of room to spare. It's starting to make me wonder: do you have to grow up with this headset? Is it like artificial cranial deformation? You start off as a toddler playing games with this headset and over time your skull changes to fit the headset?



 Picture of typical Sennheiser customer skull


I had to send the PC333D G4ME back to the online retailer with a financial penalty so that has left me grumpy.

What surprised me is that it's very hard to find a headset with ear cups that are properly circumaural. All of them seem to have ear cups that are about a centimeter too small. Except for Plantronics whose ear cups are 2 cm to small. If you're wearing a headset all day they will press on your ears and become uncomfortable.

I was also surprised that many manufactures (some not explicitly mentioned here) ship their headsets with terrible microphones. If you're gaming online this tends to only annoy other people. However, if you're trying to do digital dictation, a good microphone is important.

The one manufacturer I haven't tried is Koss. This is partly because I can't figure out where Koss products are sold in Montreal and don't want to play the online ordering lotto again. The most comfortable headphones I own are Koss. Talking to their sales staff they might have a headset with large enough ear cups. I say might because no one at the company would commit to any measurements so I am still not sure.

At the moment I'm using a new pair of  Plantronics 655. They aren't the most comfortable headset ever but they were dirt cheap, they have a good microphone and they don't crush my skull.  I'll continue to use them until I can get a decent replacement.

Wednesday, November 12, 2014

Space Smilies (beta)

For the last 4 months or so, I've been writing a video game and it's now at the beta testing phase.

The game is called Space Smilies and is similar to space invaders but with a few differences that show themselves as the game progresses. It also includes a built in level editor so you can tweak your own levels simply by adjusting a few parameters.

The game is based on the old Space Smilies code that made an appearance on this very blog back in 2010. That code was in turn based on a video game I wrote in 1999 while studying at University so the code has had a long history.

The game is built for the Android platform, so if you have an Android phone (or Android compatible) you can try it out below:

Space Smilies for Android

Note, the link above is updated with new versions as they are built so if you want to get the latest build all you need to do is re-download it using the same link.