Posts

Moving my writing to GitHub and Medium

I want o get back to writing online. But from now on, I am planning to do so at https//ruicovelo.github.io and  https://medium.com/@ruicovelo . 

Hello OutSystems

Early this year I switched from IBM to OutSystems in a move some considered crazy, some considered bold and some considered fantastic. After 10 years working with infrastructure I am now working as a software engineer, the job I dreamed about when I was around 12 typing way on my Spectrum 48K. But I really don't get that kind of feeling like “I finally got there”. In fact I have grown an interest for many other aspects of computers and technology other than software so I am very glad to be a Cloud Software Engineer which means I get to build software with infrastructure and security in mind too. OutSystems is a great place to work. The company makes a huge effort in order to keep people happy and motivated. There are rules though that really make perfect sense and keep everyone productive and motivated rather than annoyed and controlled. They focus on how you should act rather than things you can't do. They also target management behaviour rather than being limited to the...

MyBot

I have been interested in tracking my every move automatically for some time. I cannot count the times I have tried to remember "when did I got to that place" or "when did I do that thing with my friends". This is probably a common problem but I think I probably forget more than most people and being a geek and a gadget lover, I became somewhat obsessed with having my gadgets track me so I could get back to that memories easily. There are lots of services that can be combined together to create something like this and I have tried some of them. IFTTT , Momento  and Day One  are very good examples. None of them is exactly what I need but they are an excellent help. There is also the problem of who to trust with my data and how long will these services keep running and doing this job for me before they shutdown for whatever reason and I have to move my data around once again. So I decided to roll my own set of scripts that gather this data for me on my own hardware....

Trying out Post app for iPad

Image
Really. This is just a test. Heading 1 Heading 2 Heading 3 Heading 4 Heading 5 Heading 6 Pre Blockquote Seriously. Just testing.

Geek on wheels

Image
After years of dreaming of ridding a motorcycle, I finally got my license. But that wasn't all I needed to accomplish my dream. I also needed a bike. Off course there were always a lot of biker friends around to borrow a bike from. My favourite was my sister-in-law's 2008 black and white Triumph Bonneville T100. But it's not the same thing. I needed MY OWN bike. Two years too late, it finally came the time to get my bike. My search was a bit short. Too short maybe. But what did I search for? not too expensive classic look easy to ride practical As you can see, I lack the mechanical expertise to look for mechanical characteristics. I did ask a few experts but their opinions were almost always concluded with "... but you should try before you buy and choose whatever makes you feel better...". So short story really short, I got myself a 2010 Triumph Bonneville T100 Black and I'm enjoying every minute. Ridding this bike seems to me a pretty good definiti...

GetExpandedStringValue: Type Mismatch

This is another post about time painfully spent trying to solve a simple bug. I'm currently migrating a lot of VBScript code to a VB.NET application. Before you email me about how I should be using C#, please take note that migrating code is already tricky enough as it is so I decided for a language that shares a lot of syntactic similarities with VBScript. Back to the bug, I was migrating this VBScript code: Const C_HKEY_LOCAL_MACHINE = 2147483650 Dim Server Dim strValue Dim objReg Dim strKeyPath Server = "localhost" strValue = "" Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & Server & "\root\default:StdRegProv") strKeyPath = "SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName" If objReg.GetExpandedStringValue(C_HKEY_LOCAL_MACHINE, strKeyPath, "ComputerName", strValue) 0 Then Error ("error r...

My birthday cake

Image

PowerShell: which for windows

As Stephen Mills points out in a comment below, all this is unnecessary because there's a cmdlet that does this even better. Get-Command So please disregard this post :P Fresh code out of the oven. I was on my Windows XP box and needed to know where I had an specific executable file stored. Some Windows boxes have a similar command called where but it wasn't availed in my box. So I just coded one in PowerShell. function which ($file){ $return = @() if (Test-Path ".\$file" -ea silentlycontinue){ # check current dir $return +=@(".\$file") } foreach ($path in (get-content env:path).Split(";")){ # check all paths in PATH env var if (Test-Path "$path\$file" -ea silentlycontinue){ $return += @("$path\$file") } } return $return } Off course it can be refined - and probably should - but it's good enough for most situations. Ex: > which notepad.exe C:\WINDOWS\system32\notepad.exe C:\WINDOWS\notepad.exe PS: I store...

PowerShell: very simple FTP client

One of my first experiments with PowerShell, besides ls and HelloWorld.ps1, was trying the object oriented features and the .Net Framework. I was at the time thinking about a problem I was having with an FTP client I was using and I asked myself: "Would it be possible to make an FTP client with PowerShell?" I knew there was a .Net class that implemented an FTP client so I googled and bit and found it . After reading the examples shown and a little try-and-error, I came up with this extremely simple FTP client in PowerShell below. Note that by "extremely simple" I mean "with very few features and no error detection code". This only gets one file from the FTP server. I probably wouldn't use this in production without a few changes. But it's still a nice example on how to use the .Net framework with PowerShell and this class in particular $localfile = "c:\file.txt" $remotefile = "/folder/file.txt" $ftphost = "ftp://ftpserver...

PowerShell

A few weeks ago I had a chance to attend a workshop about PowerShell entitled "Using PowerShell" by Ed Wilson . Fantastic teacher and fantastic person to talk to about anything. This was my first time using PowerShell. I had tried one of Monad's first versions but it took so much time to load and crashed so many times I decided to wait for a final version. I ended waiting a bit more than the final version though. My first impression was "This is fantastic!! ". And it really is. Being a lover of the command line and an avid user of Bash and other UNIX shells, I welcome PowerShell. I'm not going to compare Bash and PowerShell and try to guess the best shell. In my humble opinion, they're not comparable. For that kind of entertainment, google for PowerShell vs Bash. You'll probably get a lot of results with links to endless and pointless discussions between UNIX and Windows zealots. PowerShell and Bash have very few similarities. Quoting Ed Wilson ...

Missing Win32_Product

Today I spent some frustrating time debugging a VBScript looking for an authentication problem that didn't exist. I was trying to a install an MSI file on a remote server and kept getting "SWbemServicesEx: A security package specific error occurred." Googling the error only drove me further in the wrong way. Only when I decided to run the script locally on the target computer I realised it wasn't an authentication problem. At least not any more. The error was now "SWbemServicesEx: Not found". I then noticed the Win32_Product class I was using to install the MSI files did not exist. I googled for the error and found lots of people with the same problem but no straightforward solution. Well... it turns out this was not the first time this happened to me... Maybe the next time this happens I google it and find my own blog post with the answer. It's as simple as this: "Add/Remove Programs" "Add/Remove Windows Components" "Management...

Citing Wikipedia

I love the Wikipedia . It's a great place to search for any kind of information and a good place to start learning about anything. Is it trustworthy enough so you can cite it in scientific projects? Well... that's arguable and has been arguable since it was created. But arguments I have read aren't always good enough for one side or the other. Even though anyone can edit it and insert incorrections, the articles are quickly corrected by maintainers and visitors. I've seen this happen in real time while I was browsing the wikipedia. Off course this depends on the article itself and the attention it gets from other users. What if when we last read it and acquired information it was wrong and only corrected after we closed the browser? In my opinion it's up to the reader to cross check the information before using it in an important project. But this is also true for most scientific papers. This is one of those views , against citing the Wikipedia, that misses the poi...

Samsung CLP-300

I just bought a colour laser printer from Samsung. The CLP-300. Why the CLP-300? Most of my prints are text documents. From scientific papers to music tablatures and, off course, "how to" articles. I rarely print photos... and I definitely didn't want to buy a relatively good photo printer for a reasonable price and then spend the value of the printer per month in ink cartridges. I might be exaggerating a bit here but you get the idea. Laser printers are usually cheaper per print and therefore a cheap monochromatic laser printer seemed to be a good choice for me. I only had one more problem to solve. I live with my girlfriend and she would be using the printer too. The problem is she loves colours. My plan is ruined... or is it? I started looking for colour laser printers but most of them were very expensive. Much more than the monochromatic models. Enter the CLP-300. It's a small sized (at least for a laser printer), it's low priced and it's relativ...

Another Mac OS X installation bites de dust...

This time it was scary... and I'm still scarred because I'm not sure what happened and if it will happen again. I hope it's not a hard-drive problem but it sure looked like it even thou the Disk Utility didn't report any problem. I had shut down the laptop for a while and when I came back, it didn't start. There was no rEFit menu as the MacBook seemed to go directly to Mac OS X. But Mac OS X wouldn't start either. I would get to this screen where a progress bar appears but the progress bar kept returning to zero and start all over again. I then booted using an Ubuntu Live CD holding the "c" key at start up. It booted fine and all my data seemed ok. So I backed up all of it to another computer. Again, Linux saved my day. I then tried to reinstall over the current partition but no go. The installation utility kept telling me some error occurred trying to install and advising me to try again. The only way I found to install OSX was by removing all existe...

HP laptop problems (PART 2)

If you've read my previous post about the problems I've been having with my HP dv6000 laptop, you might know about the workaround I found to turn the laptop on when it refuses by removing the battery first. If you've read the comments on that post, you might also know that that workaround stopped working a few weeks ago. So the laptop is again on it's way to HP for repair. Backing up my data... but the laptop doesn't start! I was a bit scared about my data on the hard drive at first. Since the laptop wouldn't turn on, I couldn't back up my recent data (actually a few photos of a special day and some of my girlfriends documents... and a NBA Live save game...). HP told me that there was nothing they could do. It's part of their repair process to reformat the drive and reinstall the system and they don't do backups. This is on their warranty agreement and they confirmed this on the phone. They also told me, here comes the good news, that I could remove...

Expecting two OS releases this month

There are two operating system releases expected this month that I look forward to: Mac OS X for my MacBook and Ubuntu Linux for... all my computers... including the MacBook. Ubuntu is expected tomorrow, the 18th October. Mac OS X is expected on the 26th October. Ubuntu, as usual, can be obtained by downloading it for free. Mac OS X will probably be the first operating system I'll buy but I'm not sure yet. It's new features attract me and the price is not that high (at least comparing it with the price of that "other operating system" which must come in a gold plated box). But Ubuntu is free and will probably give me all I need and even more. Decisions, decisions...

HP laptop problems (PART 1)

One of the laptops I have at home is an HP dv6000 laptop. The laptop looks great. I like it's design, characteristics and price. I was very happy with it (and specially my girlfriend as my main laptop is my MacBook) until the problems started. First problem: beeping Even though it was definitely shut down it would just start spinning the fans at maximum speed and beeping loud. The only way to stop it was by removing the battery. This was very annoying and specially when it happened at night. A friend that had a friend that had a friend that worked at HP support told me that it was a known problem and could be solved by updating the firmware. I updated the firmware and it went way. Second problem: cannot read CDs A few days later, another problem. While reading a DVD (or was it a CD?) the computer hanged. I forced a restart just to find out I could not read any CD. DVDs worked just fine. I phoned HP and after reverting the laptop to it's default configuration with no results (as...

Google acquired Jaiku

According to Official Google Blog: Reach out and message someone , Google acquired Jaiku . begin rant mode I wonder how many social networking services are out there? And how many of them will Google need? (talking about Orkut ) The proliferation of these kind of services is a bit annoying. I think these services are useful to stay in touch with people. I don't really care about making new friends on-line at the moment but I like to use these services to stay in touch and know what my friends have been up to. But with all these services, I keep receiving invitations from friends in different services. It's annoying to maintain accounts in Orkut, Hi5, Jaiku and others I don't even remember the name... but I know I have created more accounts somewhere in time. "But Jaiku can be used on your mobile" you tell me. I guess each of this services has something the others don't have. I'm sure I wont be convincing all my friends to change service every time some new...

The Book Depository

I love books. I love reading books. Real books. The ones you can touch, open and go through the paper pages. Carry with you anywhere without worrying about Internet connectivity or any piece of technology whatsoever. So I buy the books I need whenever possible. A problem for me is that in Portugal, books tend to be expensive. Specially translated books. To avoid this high prices, I turn to the Internet and on-line book stores. The most used on-line book store, Amazon . I find books in Amazon usually cheaper than in Portugal. For instance, I bought a book from Amazon for about €45 that was being sold in Portugal for €76. But there's still a problem. The shipping costs. Recently I learnt about The Book Depository , tip from a college professor. This site has books at an affordable price and they don't even charge shipping cost for a wide number of countries including western Europe. My most recent purchase: Critical Chain.

Anonymity vs Privacy

Here is a very interesting post by Schneier on anonymity and privacy, how they are very different. I also would add that this is also a good example on how trusting something you really don't understand how it works is not a very good policy. I don't expect all Internet users to understand fully every piece of technology or software it must use (for instance, on-line shopping), but I guess embassies and governments have the resources to at least ask someone if a technology they are thinking of using is really secure.