« Posts by Ruben

Fail of the Day: Cremation is Sad

OK, so today, I decided to ease out from the tech talk to bring you this mind-boggling EPIC FAIL that I just came across.

It seems that even the best life insurance resource has its weak days. But this time, the lack of common sense that produced this image and its description is outright questionable. See for yourselves:

A screenshot of an insurance article with an image

Cremation is sad but popular nonetheless

Apparently, somebody did not see things in context when they attached this image, with this description, to this type of an article. Thankfully, I was not eating anything when I read this.

There’s not much more to add. Perhaps just that you may check out the full flaming article here.

Generate Your Own decryptionKey and validationKey

Generating your own hexadecimal encryption keys may be very useful, especially when you are hosting your web application on a web farm of multiple servers.  Providing unified security tokens on application level will ensure that your page state will be preserved across postbacks.

If you want to, you can simply type in your encryption keys yourself using the keyboard and your own mind as a randomizer.  Just make sure they are of the proper lengths (48 HEX characters for decryptionKey and 128 HEX characters for validationKey) and you are good to go.

If you are feeling more geeky, however, you might want to try the programmatic way of creating your keys.  Under normal circumstances, you could use the regular Random class as randomizer, but why not use the more advanced Cryptographic Service Provider, which apparently offers better security? »Read More

Keep ASPX Session Alive Using machineKey in Web.config

You may have noticed that when your ASP.NET pages are running in a hosted environment, there are issues with preserving and parsing postbacks.

An ASP.NET application is not particularly well-equipped for handling postbacks on hosted servers out of the box.  The reason for this is that postbacks (and ViewState) normally get encrypted (hashed) so that they cannot be tampered with on the way back to the server.

The keys used to encrypt the information stored in ViewState are supplied by the configuration files.  Say hello to decryptionKey and validationKey.

Just as all other configuration properties, system.web.machineKey is normally specified in Machine.config, which—as its name implies—is unique to every machine.  You do not have to provide your own hashing codes – they are supplied (randomized) by the IIS installer. »Read More

How to Make a Lightweight Twitter Share Button

The original Twitter button is nice and useful.  It has one major disadvantage though – it comes as an IFRAME, bringing with itself an entire HTML document with JavaScript, etc.  This means that when you embed a Twitter button onto your page, you cause the load times to soar, and your visitors will have to download plenty of overhead data just to show one simple button. Even worse, visitors with disabled JavaScript (or a simpler mobile browser) will not see anything.

In this post, I will show you how to make a Twitter share button (or a ‘tweet button’) that looks exactly like the original, loads lightning-fast and does not query any server but yours.

»Read More

Special Characters in Web Jump Lists (IE9+Windows 7)

Scribz.net™ has been using Internet Explorer 9′s Pinned Site capabilities for a long time, especially the Jump List features.  And why not – they are so easy to implement and quite well-documented (see the Jump List documentation on MSDN).  The basic functionality can be achieved by adding but a few meta-tags into the head of your page and you’re set.  It actually takes more time to stitch together the page icons than to make your site IE9 ready.

Basic Setup

The following meta tags set the basic icon and text properties of your pinned site:

<meta name="application-name" content="Example Web Application"/>
<meta name="msapplication-tooltip" content="Start Example.com in Site Mode"/>
<meta name="msapplication-starturl" content=http://example.com/index.html/>
<meta name="msapplication-window" content="width=800;height=600"/>
<meta name="msapplication-navbutton-color" content="#77FF33"/>

You can read about the details for each item in the MSDN article linked above.  Also please note that the msapplication-tooltip only shows when the user hovers over your application’s icon in the Start menu.  I haven’t ever seen it pop up above the pinned Taskbar icon.

You can easily input any Unicode and international characters into the application-name and msapplication-tooltip content attribute by using HTML entities.  Will this work for the msapplication-task meta tag, though?

»Read More

The Initial Design 1: The Visuals

Once I was sure that my own online notepad, I was wondering where to start – do I begin with the architecture of the application, or do I start with the visuals and layout?

To be frank, this wasn’t as straightforward a decision as one would hope.

Normally, starting with the information workflow and application structure is the best idea.  Granted that you know exactly what you are going to produce, of course.

In this case, I decided to take the artist’s approach to the task; some may call it behavioral.  Scribz.net™ was going to be a very simple application after all (at least initially) so I figured that starting with the visuals might help me decide which features I would want to include and in what order.  I thought that I could devise my application structure based on the logic of the usability.  I was sure I could code (implement) almost anything related to this application, so I felt that a reversed approach might be justified this time.  How cool that the simplicity and power of Scribz.net™ was already proving at such an early stage!

Thinking Visually

Drawing different mock-ups of the visuals was quite fun.  I ended up with several napkins and torn college block pages scribbled all around with notes, random arrows, and tiny bits of explanations.  I did most of my drawing by hand, with virtually no computer help.  I though I should mention that.

»Read More

The Skills

Market Research

As I mentioned before, I needed a .  I did some initial research to find out whether there was a similar application out there.  I came across a few online notepads, but most of them supported rich-text or HTML formatting.  If I wanted that, I thought to myself, I would have gone to Google Docs, or Microsoft Web Apps.  I didn’t care for fancy, I just needed speed, reliability, and universal accessibility.  Obviously, the rich apps were not the way to go and were not my competition either.  Phew!

The closest to an online notepad was Google’s Notebook app.  Whereas it is made of the nice, familiar Google interface, it is a little bulky and you have to be logged into the same Google account to which your notes belong.  Yeah, there is sharing, but why worry about that?  Also, it is not exactly plain text either and is not even supported anymore, as far as I’m aware.  Worst of all, it auto-formats links and has this weird separation of bookmarks and note content.  All in all, seemed like a poor choice as well.

Never mind, it was going to be my way or the highway, which usually turns out to be my highway.  Or at least my sidewalk.

So I asked myself – could I do this?

My Abilities

Before I could start with any coding, I had to sit down and try to wrap my mind around the entire idea.  I had to know what I was about to do and I had to know whether I was actually going to be able to do it.  In other words, I first tried to remember all I knew about programming already:

»Read More

The Story of Unicode Byte Order Mark (BOM)

… or Windows Live Writer 2011 & WordPress

I was frustrated.  I was completely disappointed and ready to give up trying to set up Windows Live Writer to work with my  freshly established Scribz.net™ WordPress Blog.  I kept receiving the following error from my newly installed Windows Live Writer upon sign-up to my WordPress:

The response to blogger.getUsersBlogs method received from the blog server was invalid, something-something XmlRpc something-fail-something…

And the following error appeared in the Windows Live Writer log:

Invalid response document returned from XmlRpc server —> System.Xml.XmlException: Unexpected end of file while parsing Name has occurred.

My native WordPress online user interface worked just fine.  It seemed that there was a problem just with Windows Live Writer 2011 and its connection to the XmlRpc interface.  I spent countless hours trying to figure out what was wrong almost until the point of no return.  Just as I was going to give up on the issue, however, the sleepless night paid off and I managed to find the unlikely culprit.  Now that I wiped the floor with it, I am writing this post from Windows Live Writer.

The Cause

So I set up a fresh new subdomain on a Microsoft IIS 7.0 server at my hosting company.  I downloaded the latest version of WordPress, unzipped it and copied it verbatim to my FTP server.  I was excited because this was going to be my first real attempt at blogging.

»Read More

How Scribz.net™ Was Born

I Need a Notepad …

So it all started when I was working for this Big Four firm.  I occasionally found a piece of interesting information while at work and I wished that I could store it somewhere and come back to it later.  Don’t get me wrong – I worked really hard, but in spite of that, intriguing thoughts and ideas do sometimes cross one’s mind, right?

The problem with “storing it somewhere” was the fact that when you are working with confidential data (as we were), your computer is pretty tightly protected against accidental (or malicious) data leakage.  In human speech, this means that I could not save or copy anything from my computer to an external medium unless it was an encrypted USB stick.

Encrypted USB sticks, however, are usually bulky and not exactly user friendly.  Not only do you always have to enter your password when you connect one (obviously), but there is usually a lot of work-related stuff on your stick, plus it gets shared among team members.  This way, organizing gets messy and you are risking that your colleague or client will open your notes – not good

I normally take notes in – you guessed it – Notepad.  I very much like plain text because it stores just what you need and does not get confused with any sort of formatting or automation. »Read More