technology
“I’m always worried I’m going to blow something up”
by TrueJournals on Aug.07, 2012, under technology, thoughts
For the past two summers, I’ve worked at a level 1 tech support job at my college. For those unfamiliar with this jargon, this means that I’m the person who sits at the help desk, and attempts to help out anyone who comes into the desk, or calls the phone, or e-mails us. Technically speaking, it’s a pretty simple job, as we do some basic troubleshooting, then bump any issues up to level 2 if we determine we need to fix something in person.
Today, I was on the phone with someone, and they inadvertently reminded me of the difference between “technical” people and “non-technical” people.
The phone call was simple: Gmail brought up a page reporting that the person’s browser was out of date because they were using Internet Explorer. I suggested that he install Chrome, as it is a faster and more secure web browser, and now our “officially supported” browser, and proceeded to walk him through the installation.
And when I say walk him through the installation, I mean walk him through every step of the installation. Every button he should click, when he should click them, etc. During this process, he explained to me why he was asking for my help at every step of the process:
I’m always worried I’m going to blow something up.
So, this is the difference between “tech” people and “non-tech” people: the non-tech people think that if they click a wrong button, their computer will either explode, or stop working permanently. The tech people have opened their computer to find that no explosives are contained within.
One of the things I enjoy doing is breaking my operating system. I use Ubuntu Linux as my main operating system, and regularly do stupid things that might be considered destructive. But that’s OK — I know that I can always get my data, and I enjoy going through the processes of figuring out what went wrong, and how to fix it.
In a word, I’m fearless when fixing computers: I know that if I click the wrong button, there’s always a way to go back or undo whatever I just did. Sometimes, this is as simple as clicking a “back” or “undo” button. Sometimes it’s a bit more involved, but that’s OK! Because it means I’m going to learn what doesn’t work, and possibly learn something more about my operating system while I attempt to fix what’s broken.
If there’s one piece of advice I can give to non-tech people, it’s this: don’t be afraid to click buttons. Seriously. Most buttons you press are not going to permanently destroy your software. If you’re worried about losing data, make a backup of whatever file you’re working, then click buttons to your hearts content!
Building a Better WHD Notifier
by TrueJournals on Jun.29, 2012, under programming, technology
At my work, we use Web Help Desk to track support tickets. It’s a very nice, very slick piece of software, and from my understanding, version 10.2 implements an API going forward. Unfortunately, we use version 10.1.10.1, which doesn’t have the same API.
The problem I ran into was this: often, there are other tasks to be completed, so I’m not just staring at the WHD ticket queue the entire time I’m at work. However, if a client logs a ticket, I have no way of being notified without going to the web help desk page and checking manually. This results in one of two things happening: either I check the ticket queue every few minutes, breaking my workflow on other projects, or a ticket doesn’t get responded to for a while.
I wanted a way to be notified of new or updated tickets that pop up without having to continually go back to the WHD tab of my browser to actually check for new or updated tickets. Unfortunately, without an API, I thought this was going to be difficult. Until I found this: a WHD Notifier for Chrome.
However, this still didn’t quite achieve what I was looking for. While this did provide me with a notification of the number of new or updated tickets within the browser, it didn’t notify me when this number changed. So, I still had to watch my web browser, and even then, continually check this small, inconspicuous number in the top-right corner of my screen. Since Chrome extensions are simply Javascript, HTML and CSS, I decided to try my hand at modifying it to better suit my needs.
Here’s the list of things I needed:
- Pop-up notifications of a change in the number of new/updated tickets (like in Gmail).
- The ability to not save username and password. The computers share a single profile between multiple users, so I don’t want individual passwords saved past the browser session.
- (Optional, if I could figure it out) Grabbing login info from the WHD web login, so you don’t have to go into the extension options every browser session.
After some coding, a lot of trial and error, and a lot of research, I was able to meet all three goals. If you’d find it useful, you can download WHD Notifier version 1.5. Simply configure it with your WHD URL, choose what to display/be notified of, and you’re good to go. If you login to web help desk, the notifier will grab that login information and start updating.
If you’re interested in seeing the source code for this extension, you can find a zip of the source here. I’ll see if I can throw it up on GitHub later today or this weekend. There’s some interesting things being done here — submitting the login form in WHD sends a call to forms.submit() instead of going through the normal submit procedure — this means that I couldn’t simply add an onsubmit handler to capture the login information.
Instead, I inject another piece of JavaScript into the page which overrides the submit() method for all forms. This calls chrome.extension.sendMessage to message the background page with the username and password, then proceeds to call the submit() method I had overridden. You can find the form handling things in autoLogin.js and autoLogin2.js. I had to inject autoLogin2.js on the page because chrome content scripts aren’t allowed to override prototype methods.
If we ever update our WHD installation, I’ll try to update this extension again to use the new API — I should be able to add some more features with that, too. For now, this should work for all versions of WHD 10.0.8 or later.
Update: Code is now on GitHub
Automatically Associating Label and Input, and Setting Width
by TrueJournals on Jun.26, 2012, under technology
When creating forms in HTML, one of the best practices is to always use <label> to associate the labels with their form fields. However, this creates the complication of needing to give each label the “for” attribute, and perhaps wanting some extra magic to set the width of each label so that all the form fields are lined up. Recently, I decided to play around with form fields like this a little to see if I could automate this process using jQuery.
Here’s what I came up with:
var w = 0;
$("label").each(function() {
if($(this).width()>w) w=$(this).width();
// Assume the input immediately follows the label
var input = $(this).next();
input.prop('id', input.prop('name'));
$(this).prop('for', input.prop('name'));
});
$("label").width(w+10);
$("label").css('float', 'left');
And here’s what it does: first, it loops through each label on the page looking for the maximum width. When it finds that, it sets all labels to have a width of (maximum width)+10px. The extra 10px are just so the label and field aren’t directly on top of one another.
In the same loop, this code associates the label with the field next to it. For my sake, I made the assumption that I will always have <label>…</label><input />. If this is not the case, the code will associate the label with the wrong field. It simply sets the next element’s id to be the same as its name, and sets the label’s “for” property to be the element’s name, also.
Use this with caution. If you’re not careful, you could end up with duplicate IDs (a no-no). There are other reasons this code isn’t necessarily a good idea, but it’s good enough for me. For a page with a lazy HTML coder, this will work perfectly.
Bonus: Add input.prop(‘placeholder’, $(this).text()); inside the loop to also set the “placeholder” text to whatever the label is. You could also detect if the browser supports “placeholder”, and hide the label if it does:
var w = 0;
$("label").each(function() {
if($(this).width()>w) w=$(this).width();
// Assume the input immediately follows the label
var input = $(this).next();
input.prop('id', input.prop('name'));
input.prop('placeholder', $(this).text());
if('placeholder' in document.createElement('input')) $(this).hide();
$(this).prop('for', input.prop('name'));
});
$("label").width(w+10);
$("label").css('float', 'left');
Conditional Formatting in Google Docs
by TrueJournals on Jun.05, 2012, under technology
Recently, I was working on a project which involved generating a spreadsheet of a bunch of changes I was making to some information. As part of this, I wanted to color code the rows of the spreadsheet: green would mean OK, yellow would mean a change, and red would mean a problem. I could do all this formatting manually… but I decided to find a way to make Excel do it for me. Enter conditional formatting!
Conditional formatting in Excel is very, very robust. For this project, I needed to change a row’s background color and font color based on three possibilities:
- If Column E has any text, the row should be red.
- If Column A and Column D contain different values (case-insensitive), the row should be yellow.
- Otherwise, the row should be green.
Unfortunately for me, Excel’s conditional formatting works on a per-cell basis. However, Excel does provide the ability to choose conditional formats based on a formula! After some fiddling with Excel functions, I was able to generate formulas to check different cells in the row, then apply the conditional formatting based on that. I ended up with these three formulas, executed in this order, and corresponding with the above three conditions:
- =AND(CELL(“contents”, INDIRECT(CONCATENATE(“E”, ROW())))>0,ROW()>1)
- =AND(CELL(“contents”, INDIRECT(CONCATENATE(“A”, ROW())))<>CELL(“contents”, INDIRECT(CONCATENATE(“D”, ROW()))), ROW()>1)
- =AND(CELL(“contents”, INDIRECT(CONCATENATE(“E”, ROW())))=0, CELL(“contents”, INDIRECT(CONCATENATE(“A”, ROW())))>0)
Wow! First, notice all of these start with an AND function. AND evaluates the conditions given, performs a logical AND on all of them, and returns a boolean true or false based on that. Explanation of the conditions:
- Two conditions:
- CELL(“contents”, INDIRECT(CONCATENATE(“E”, ROW())))>0 checks for text in Column E. If there is nothing in the cell, the value is 0.
- ROW()>1 checks if this cell is NOT in the first row. The first row is my header row, and I don’t need that one color coded.
- Two conditions:
- CELL(“contents”, INDIRECT(CONCATENATE(“A”, ROW())))<>CELL(“contents”, INDIRECT(CONCATENATE(“D”, ROW()))) checks if the contents of the cell in Column A and the contents of the cell in Column D are different. The <> operator is “not equals”, and Excel seems to automatically do a case-insensitive comparison.
- ROW()>1 checks if this cell is NOT in the first row.
- Two conditions:
- CELL(“contents”, INDIRECT(CONCATENATE(“E”, ROW())))=0 ensures that Column E is empty. (Again, the value is 0 if there is nothing in the cell)
- CELL(“contents”, INDIRECT(CONCATENATE(“A”, ROW())))>0 ensures that there is some value in Column A. If there’s no value in Column A, there’s no point in any highlighting.
Alright… So, with all those conditions set up, text is automatically highlighted based on what values are entered. This made editing the spreadsheet really easy: simply type in values, and the highlighting is automatic. If I go back and change something later, the highlighting changes without me needing to do anything. (continue reading…)
Are Penny Auctions a Scam?
by TrueJournals on Jul.17, 2011, under technology, thoughts
If you haven’t heard, someone was lucky enough to buy a Chevy Camero for only $5.28. Now, if you actually read the article, you’ll notice a very important detail: this car was bought off a “penny auction” site. These sites, like quibids.com, are becoming more and more popular. Recently, I’ve had a couple of my friends ask me my opinion on these sites: are they a scam? It certainly sounds too good to be true. But, I will give this sites credit: real people do win real items from these sites. In this sense, these sites are not a scam.
So, how exactly do these sites operate? How can anyone run a profitable business by selling $1,000 products for about $20? The answer isn’t generous owners. While we might like to think that there are people that generous in this world, it’s simply not a sustainable business model. Click through to the rest of the post, and I’ll do my best to explain how these sites work, and why you shouldn’t (or maybe should) waste your time.
(continue reading…)
Obligatory Google+ Post
by TrueJournals on Jul.03, 2011, under technology, thoughts
Well, here it is — my actual post about Google+.
For those of you who still haven’t heard, the bird is the word Google+ is Google’s new social networking experiment. Their response to Facebook, if you will. Google has more-or-less tried this before, with Buzz, but Buzz never really took off. At this point, it’s difficult for me to tell what Google’s strategy is for how Google+ and Buzz will coexist. Right now, they seem to be completely separate, yet strangely intertwined. I have a feeling that as Google+ develops, it will eventually completely replace Buzz.
I hope this is helpful. Unfortunately, I’ve left out screenshots for now. I’ll try to get some in later this week to better illustrate what I’m talking about. Added screenshots July 4 @ 11:50 PM.
Now that you know what Google+ is, click through to read an overview of my view of the evolution of Google+, a review of the UI, and my general thoughts on things.
(continue reading…)
How I Wrote My First Software Crack
by TrueJournals on Jun.22, 2011, under technology
Before I really get into this article, I need to place a couple notes here:
- This is a semi-technical post. It assumes some knowledge of programming and how software works, but I’ll try to keep it as simple as possible.
- I’ve done my best to not give away what application I’m writing about. This is on purpose. While this is an interesting look into hacking software, getting around DRM is, to the best of my knowledge, illegal. This article is actually about reverse-engineering, not cracking software.
- If the author of this application finds this blog post and thinks I’ve given away too much, they should please e-mail me and I’ll take it down. If you think this article is about your application and it is not, however, I will not remove the article.
- If you like software, buy it! Seriously… software developers need to eat, too!
Now, let’s get into the bread and butter of this article!
Why Net Neutrality is Important
by TrueJournals on Aug.20, 2010, under life, technology, thoughts
I can’t believe I haven’t written a blog post about Net Neutrality. For those of you who know me personally, you should know that I’m a very strong supporter of Net Neutrality, and believe it’s very important that we make sure the Internet is kept neutral. However, for whatever reason, there are a LOT of misconceptions about Net Neutrality, and what exactly it entails. Since Net Neutrality in reaction to Comcast has once again come up in the news recently, I figured I should write a blog post about the subject.
First, let’s go into some background on the Comcast case. A year or so ago, Comcast decided that its network was being congested by too much P2P traffic; namely, traffic from the BitTorrent P2P protocol. So, they decided that they would clear their network of this congestion by carefully denying BitTorrent connections. They did this by looking into the traffic that BitTorrent was sending over the network, and sending back false information so that connections to peers would fail. The actual details of how this was done is outside the point of this post.
After some outrage from Comcast customers who used BitTorrent, the FCC decided it would step in and tell Comcast to stop or suffer consequences. As soon as this happened, there was some question about whether or not the FCC actually had the power to do this. But, the case went to court and a judge decided that the FCC did have the power to do this, and that Comcast had to stop denying BitTorrent connections in this way. This was a major win for users of the Internet: the court decision basically meant that your ISP can’t deny you from accessing information on the Internet. (continue reading…)
Should I Defrag?
by TrueJournals on Mar.16, 2010, under technology
If you use a computer (and, since your reading my blog, I assume you do), you might have heard the term “defrag” at some point or another. Maybe instructions for installing a program said you should defrag your harddrive before you install it (I believe “The Sims” had this in their instructions), or perhaps you’ve just heard one of your friends use the word. Today, I received an e-mail from my dad asking me a seemingly-simple question: “Should I periodically de-frag my laptop? What does this do? How do you do it?” My response, however, was a bit more complicated.
In this blog post, I’m going to attempt to explain, very simply, what defragging a harddrive actually does, and why you should, or shouldn’t, do it. Some of my more technically inept readers may think I’m oversimplifying things by not dealing with the different filesystems, not explaining exactly how data is written, etc., but that’s not the point of this post. My goal is to explain, in the simplest terms possible, how your harddrive works, and what defragging the harddrive does, in terms of how data is stored on the drive. To start, I’ll explain the typical way data is stored on the drive, then I’ll talk about what types of situations create harddrive fragmentation, next I’ll explain why fragmentation is bad for your harddrive, and, finally, I’ll give an argument about whether or not you should run a defrag tool. (continue reading…)
Why Did Wave Die so Quickly?
by TrueJournals on Feb.15, 2010, under technology, thoughts
A while ago, I was super excited to finally get a Google Wave invite. Today, I barely ever used the service. I just open it every now and then to see if anything’s happened. Generally, it hasn’t. But… Google Wave had so much potential! It was touted as a killer web application! What happened? Wave had so much momentum, but it seems to have crashed, and gone into one of those experiments that Google toyed around with, but no one really cares about anymore.
First off, let me say that whether Wave succeeds or not makes little difference for Google. Google is a company with enough resources to work on a major product, even if that product is a failure. Google wanted Wave to replace e-mail. This is where the whole “Federated Wave Servers” idea came from. In order for Wave to be the new standard, companies had to be able to run their own Wave servers — Google couldn’t control it. Besides that, Google already controls a good chunk of the e-mail market with GMail, so this was mostly a fun experiment for them.
But, still, it seems like something that should have succeed… or, at least, lasted a good amount of time. But, Wave has quickly lost momentum and died in everyone’s mind. The problem is that Google stopped innovating, and the Wave server never became very popular. I don’t believe there have been any feature additions to Wave since it launched, and I’m not sure there’s any good source other than Google Wave to get a Wave account.
Wave died because Google seems to have abandoned it. They released a product, and they appeared to have stopped working on it. Wave is something Google needed to not only push to corporations, but also continue innovating, and releasing new features, and this never happened. Google was unable to explain to potential customers why they need Wave, and this is where it failed. I think this is slightly unfortunate, but I’m not very surprised. While e-mail is antiquated, it still works, and it’s going to take a lot of push in order to move away from it. Google didn’t seem to have any major corporations backing Wave, which also contributed to the failure.
Who knows… maybe we’ll see Google attempt to revive Wave with some new features. Maybe it will come back for a couple months… But Google will have to work really hard to get the momentum and excitement about Wave going again.
I do, by the way, have 12 Wave invites. I suppose you can comment here or contact me if you want one. That’s a dangerous statement to say on the Internet. Although Wave has died, I have a feeling there are people who never got in on the game, and are still looking for invites, only to find a product that no one uses.