Steam client on Android is pure genius. Almost.

TL;DR: It is impossible to log in to the Steam services with the Android Steam app using only that phone the app is on (until a fix arrives).

The Steam client on Android has two security features built in it.

One of them you might already know.
If you try to authenticate into Steam from a computer/browser where you have never before logged in, Steam will not let you in immediately, but first it will ask a security code. Behind the scenes Steam sends this security code to the current email address in your Steam profile. You have to access that email, read the code and provide it to the login form (which awaits your input).

This feature is very useful. If someone were to get your Steam credentials, he/she cannot log in, as they won’t have access to your email service where the security code arrives.

The second feature is mobile phone specific.

If you download the Steam client, go to the login page, and for some reason you leave the login page in any state, username/password entered or not, and later you return to the Steam app, every field on the login form is cleared and you need to reenter it.

These two security measures combined is the most fantastic, evar.

If you try to log in with the Steam client for the first time on an Android phone and you enter your username/password, Steam’s superb “new-browser” defense mechanism kicks in. The Steam client will ask for the security code. To take a look at the security code, you have to change to Gmail (or whatever mail client) app and read the email. So when you return to the Steam app, the second “clear-the-form” feature kicks in, and the login form is cleared.

What happened to QA?

Ruby Unit test methods MUST* begin with “test_”

While being creative, and writing some tests in Ruby for testing a site release at the company I’m working at, I accidentally removed “test_” in front of the method name of the tests.

require "test/unit"
require 'rest-client'

class TestNewArticleLoad < Test::Unit::TestCase
  def if_site_loads_into_desktop_browser
    assert_equal(200, RestClient.get("http://www.google.com").code )
  end
end

Running this test results in a big nothing, no error message, just a shell prompt without error. It would be nice if Unit Test displayed the skipped methods, even warn, if not a single method were found in a test class.

Lesson learned, “test_” is a must, when defining methods for testing purposes, in Ruby’s Unit tests.

def test_if_site_loads_into_desktop_browser
  assert_equal(200, RestClient.get("http://www.google.com").code )
end

*:as in RFC 2119

Samsung Galaxy S5 dialing annoyance

When I call someone, after touching the green dial button I usually lift the phone to my ear immediately. But recently I become faster than my Samsung Galaxy S5. If I lifted the phone too fast the screen wouldn’t turn off at all, I had to move the phone away from my ear and put it back again to have the screen turned off.

Turns out, this is not a direct bug just a byproduct of a feature. I have turned on a Display feature that keeps the screen on until I look at the phone (under Display -> Smart Stay).

Turning off Smart Stay solved the problem, looks like Samsung needs to polish its software further.

EDIT:

Nope, it did not solved the problem, it is happening all the time.

Extending server support at HP, Dell and Oracle

In an enterprise environment, with fluctuating people, bosses and vendors I have several servers that are different age and of course different configuration. On a rainy day with a routine check I discover that the support for some servers:

  1. has expired
  2. almost expired (there are few weeks to expiration)
  3. haven’t expired (months to expiration)

Let’s assume in every case I want to extend the time period to 3 years instead of the expired/existing 1 year.

Dell’s reaction to these:

  1. Yeah, pay $200 fine, and buy the extension starting from the day the previous support has expired
  2. Yeah, buy the extension
  3. Step 2

Oracle’s reaction to these:

  1. Yeah, buy the extension starting from the day the previous support has expired
  2. Yeah, buy the extension
  3. Step 2

HP’s reaction to these:

  1. Our engineer will check the server for a hefty price, and if anything is faulty, you cannot extend the period
  2. Yeah, you can extend it. Buy an extension pack.
  3. Hell, no. Wait until you have less than 60 day to expiration, and then go to step 2.

Smart move, HP!

LaTeX with accented characters

Hungarian language has a few accented characters (one of them used exclusively by Hungarians) so when I decided to use LaTeX for text editing purposes (and getting PDF as result) I had to make use of UTF8, but I didn’t expect it to be so poorly documented. This is my first venture into the LaTeX territory.

The expectations were:

  • allowing using accented chars natively, so no “\’a” for “á” as the text would be incomprehensible
  • be simple to use (write, save, run, get PDF)

The options are:

  1. using Ubuntu’s LuaLaTeX as it is advertised to allow UTF8 characters in the document
  2. installing any of those LaTeXes manually
  3. using Ubuntu’s default texlive packages, with some \usepackage config in the document

Option #1 sucks.

Upon entering some accented characters, lualatex whines that it does not find ‘eu2enc.def’. Every advise on the net tells me to use texlive’s package manager, ‘tlmgr’. But Ubuntu uses its own package manager (apt-get) to install everything therefore Ubuntu doesn’t provide ‘tlmgr’. But Ubuntu doesn’t provide the ‘euenc’ package itself neither. However it is possible to install manually only the ‘euenc’ package, but now lualatex whines that it cannot find ‘xunicode.sty’. Crap.

Option #2 sucks.

It can be done, but it would take me at least a day with googleing, stackexchanging and whatnot. If I’d hate to spend time with my kids, I probably would have done it.

Option #3 might work.

It works because I’m lucky and I entered the proper string into Google that gave me a tex.stackexchange answer (the 50th this day) that I tried and it worked.

Yes, I could have read tons of documentation before experimenting but that would assume I understand some part of LaTeX, which I don’t. I only wanted to enter a frikkin’ string “áéíóúüűöőÁÉÍÓÚÜŰÖŐ” as MWE and see it in a PDF, nothing more. In short, I hate stuff that has such a steep learning curve.

Anyway, the solution is this (obviously I don’t exactly know what those package instructions do but honestly I don’t care):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}
áéíóúüűöőÁÉÍÓÚÜŰÖŐ
\end{document}

and to convert it to PDF (and viewing it altogether):

> pdflatex minimal.tex && evince minimal.pdf

Variable or method

Now I know what this error message really means…

NameError: undefined local variable or method `xxx' for main:Object
[1] pry(main)> foo = 7
=> 7
[2] pry(main)> def foo
[2] pry(main)*   5
[2] pry(main)* end
=> :foo
[3] pry(main)> foo
=> 7

equals

shoot in foot

Turns out, the ‘foo’ method is just a shorthand for ‘self.foo’ so it is still accessible, but a little bit hidden:

[4] pry(main)> self.foo
=> 5