Logic’s Last Stand

April 15, 2010

GUI Bloopers 2.0 – A brief review

Filed under: Computers, Writing — Tags: , , , — Zurahn @ 7:37 pm

GUI Bloopers 2.0 is an updated release with modern examples, but the principles remain largely the same. As detailed in the book itself, somehow the same interface problems are just timeless.

GUIs, or Graphical User Interfaces, are how most people know computers. It’s the human part of everyday computing that makes things accessible to the average person. We programmers aren’t exactly the average user, so it’s not uncommon to get great programs with terrible usability, spelling doom for the product.

While dry at times, it is a thorough guide to pointing out where design goes wrong and how to avoid it. It’s contrastable to Steve Krug’s “Don’t Make Me Think” which is brief and effective in its reasoning about how to approach interfaces, GUI Bloopers 2.0 covers every angle in detail, and by that in some ways does a better job at enlightening the developer.

I may not be able to call it a definitive guide, but it’s one area where I would in fact say that something similar, if not this, should be required reading. It’s not just a matter of GUIs, but how you think about design in general. That is to say, we’re not programming for ourselves, we’re programming for the user — we’re creating for people.

Coming in at 372 pages (not counting appendices), outside the field, for the most part it’ll read like a textbook. For those in a position relevant, though, it’s got my resounding support.

Take a look at the world from the perspective of usability, and you’ll find it hard to go back.

Advertisements

April 9, 2010

E-mail Security – Still an Issue

Filed under: Computers — Tags: , , , , , , — Zurahn @ 11:29 pm

While scam e-mails are often fairly easy to spot, it’s not a given that a ruse is going to be executed in text-only, poorly written english by a supposed Nigerian prince. Malware is big business these days, and e-mail scams are getting more professional. Take this example as detailed by Panda Labs. From start to finish it’s a perfect impersonation of an IRS e-mail, insofar as it can be for requesting detail that the IRS would not request over e-mail.

The main focus I’d like to address is that while on the Internet you can look at a web-address, and if it’s over TLS/SSL, you essentially have a guarantee that it’s the site you requested (if it says https://mail.google.com you known you’re at Gmail, for example), the same is not true of e-mail. It’s not uncommon for scam e-mails to just send from a random free e-mail account, but that’s the equivalent of the blatant Nigerian 419 scam. More professionally an e-mail can say it’s from irs.com, whitehouse.gov, bankofamerica.com or anywhere else. E-mail headers are spoofable. You can change any of that information at will, by design. For example, take a look at how easy it is to do in PHP

$to      = 'sucker@gmail.com';
$subject = 'Your account information';
$message = "Don't be a pussy, we're legit";
$headers = 'From: support@wellsfargo.com' . "\r\n" .
	   'Reply-To: support@wellsfargo.com' . "\r\n";

mail($to, $subject, $message, $headers);

As simply as that, you can send out an e-mail with false information in the header. There’s no point at which the headers are verified for consistency due to the nature of the protocol. They’re a convenience, not an assurance. The reason this does not work with websites is twofold. In general, the server does not request you, you request it. Someone can’t simply spoof a server response and send it to you anytime. It is possible, though, to act as a man-in-the-middle and intercept your request to a website and respond fraudulently. This is a genuine concern at public Wi-Fi hotspots, and less-so on private wired networks.

The protection to this is the aforementioned TLS/SSL which is an encrypted connection. The connection is negotiated based on IP address and a certificate verified by a root authority. For example, say Google gets a certificate from VeriSign at IP address 22.33.44.55. If a man-in-the-middle attempts to intercept the request, the TLS connection will fail and you’ll get a warning. IP addresses cannot be spoofed for a TCP/IP connection (though they can be spoofed in individual packets) due to what’s referred to as a three way handshake. When you request a connection to a web server, you send a SYN packet containing your IP address. The server subsequently responds to that packet with a SYN-ACK packet, sent to the IP address in the SYN packet — if it is spoofed, it will go to the wrong address and you won’t receive it. This will cause the connection to fail, because in order to complete the transaction, you must respond to that specific SYN-ACK packet with a SYN-ACK-ACK packet to confirm the connection.

Why not TLS for e-mail? Well, again, web-pages are received upon request, whereas e-mails are unsolicited; however, there is the option of assymetric e-mail signing such as OpenPGP which allows you to encrypt or sign your e-mails with a signature verifying the identity of the sender. This is not part of the e-mail specification and limited in scope of use thereby limited its usefulness.

Furthermore, it’s not just a matter of responding to e-mails that is a problem, it’s doing anything with the contents therein, including following links or downloading attachments. In great part by Adobe’s poor security practices combined with the profileration of their products, malicious PDF and Flash documents have become a primary vector of attack. There have been a slew of vulnerabilities in Adobe Reader (and FoxIt reader oft also affected) of late that allow execution of arbitrary code, meaning just by opening a PDF document, you can be infected. This is largely, though not entirely, thanks to Adobe’s ridiculously stupid idea to include JavaScript as a part of PDF files, meaning you can have scripting in PDFs. You can, and should, disable this in your settings (or better yet, not use Adobe Reader. Ever.).

Flash is embedded in web-pages, and will continue to be a larger attack target as time progresses. Following links can lead you to sites with malicious Flash files embedded, again meaning arbitrary code could potentially be executed without your knowledge or approval. If you’re not on the latest version, the more likely there is for an issue.

The attack vector isn’t necessarily just some random person, either. As detailed in a recent Security Now episode, just because it’s from someone you know doesn’t mean you can trust it, even if the header is not spoofed. One of the most lucrative assets a blackhat can get his hands on is an e-mail address. If someone gets into the e-mail of a friend or family, he can then use the information there to try to coerce you into sending money. Their life is contained in that e-mail account, likely years worth of personal information; from that, it isn’t difficult to be convincing.

Lastly, e-mails themselves can include HTML and display like webpages. In Outlook, for example, you get a preview pane such that if you just click the title of an e-mail, the contents are displayed immediately below. Convenient, but a terrible idea. Again, web-pages can contain exploits. You can, and should, switch to text-only display of e-mails.

It’s almost a cliche to warn about e-mail and the dangers of attachments, but it’s more of a problem now than ever. It’s not just don’t download and run .exe attachments anymore.

E-mail safety in summary:

  • Do not trust any unexpected e-mail
  • Do not trust e-mail headers
  • Switch to text-only mode in e-mail
  • Verify via other means any request for money, even if you know the person
  • Never open unexpected attachments
  • Do not open spam
  • If you open spam, do not reply

All that, or, you know, switch to Linux.

March 4, 2010

A Rare Change

Filed under: Life — Tags: — Zurahn @ 10:09 pm

To say I am consistent is a bit of an understatement. In a personal sense, I am not at all apt to change. Perhaps I’ve just been content with who I am, but I haven’t felt great changes in personality or preference, but I daresay I feel a change recently.

Some history: There’s long been a bit of a discrepancy in my own verbal skills; in terms of presentations, speeches and anything prepared, I often did very well. Personally I didn’t really even notice the difference myself, but particularly in high school and college, presentations got a great response. That said, interpersonally, apparently there was something to be desired.

If you want to get a sense of this, you can take a quick look back at episode zero of The Press Room — it’s not pretty, but it was a start. One little ace-in-the-hole so to speak was that I’ve for some odd reason been eloquent also when I’m angry (don’t ask why). I’ve been able to more recently distinguish the difference, and take advantage of it. Between this, the podcast, and other things, something has clicked in my mind–a certain confidence.

It’s curious timing as well. Over the past month, I have gone from miserable to glowing. I’ve still got the same problems, more or less, so it’s not all perfect, but to quote Buffy,

“I just realized something, something that really never occurred to me before. We’re gonna win.”

February 15, 2010

Perhaps I Was Wrong

Filed under: Life, Philosophy — Tags: , , , , — Zurahn @ 12:18 am

Just this once.

Back in grade school, I had a teacher who listed out human needs. Water, air, food, shelter, and companionship. That last one struck me; his demonstration was to stick an obnoxious student who thrives on attention in the hall to see if he tries to get noticed; needless to say I wasn’t convinced.

I’ll need to give you some backstory on myself. You could say I never was particularly normal — the high-point of my social life was before my family moved cities…when I was six. Since then, it’s been a rather linear progression as I further and further drifted from relating to others. I’ve tried to see where I fit, and frankly I don’t. Not to say that’s good or bad or anyone’s fault, it just is. So long ago, earlier than you would expect, I’ve had the understanding that I would live my life primarily alone, and have been mentally preparing myself as such.

It was never perfect; I had always wanted, at the least, just one person to completely relate to and for it to be mutual. That said, after spending a year working in a call centre, when I finally left, it was gone. Dead. I whole-heartedly enjoyed being alone following that, and it scared me. It was like living in a shell. Over time, I’ve been able to revive some feeling inside, yet it manages to confuse things all the more. A curious little curse that is, feel nothing or feel pain.

At any rate, that leads me to today. Essentially the only time I have human interaction face-to-face is once a week when I have lab work at University with a partner. As stupid as it is, and despite my failed efforts to understand it, I walk out of the class feeling better than I have in years. A short-lived high, but it’s helps for a day.

And that brings us back around to those needs. Water, air, food, shelter. Companionship. I thought I could do this alone, and I’ve been trying for years, but something’s got to give. I’m not healthy right now, at least, not by any fair definition — a healthy person does not feel like this — and it only progresses. Problem is, that doesn’t change who I am or anyone else is. Society around here relates drinking with fun, and the only people who don’t drink are either recovering alcoholics or deeply religious. Kinda puts the atheist non-drinker out. Of course, it’s entirely possible to get along with people very different than myself, I tend to get along with a majority of people, but I’ve found that’s limiting, for lack of a better term.

I am who I am, and I put my integrity first and foremost, so certain things will never change. I also don’t particularly think my evaluation of a life alone is wrong, either. I’m just not so sure that list of needs was off-base.

February 8, 2010

The Coward’s Dilemma

Filed under: Life, Writing — Tags: , , — Zurahn @ 6:41 pm

Laze
Labour
Life’s passing by

Wait
Wonder
Whether to try

Drive
Dream
Dare to fly

Or Wilt
Wither
And wait to die

January 30, 2010

Chess: An Introduction to Opening Theory

Filed under: Gaming — Tags: , , , — Zurahn @ 11:37 pm

Chess Openings – A Beginner’s Guide

Opening Rules

When players of significantly different skill levels play, it is common for the game to be decided in the opening itself, before the better player even really has to think. Without proper understanding of the opening, the game can be lost before it’s even started, or at the least have a more difficult position to play from, making the rest of the game that much harder. Throughout this tutorial, I will refer to rules by which to play. Given that the value of a move is dependent on its situation, these rules are not hardline laws, but general guidelines by which to consider potential moves.

At the start of the game, white has a slight advantage by nature of having the first move, and his goal in the opening is to maintain the advantage that bestows, or improve upon it. Conversely, black intends to gain equality. The method by which this is done is the same for both sides.

Fig. 1-1

Fig. 1-1

Players need the control the central squares (fig. 1-1) in order to have a foothold to manoeuvre pieces into an attack on the king. Without control of the board, primarily stemming from the centre, there is often little that can be done to facilitate an attack.

 

I.A. Horowitz (How to Win in the Chess Openings) on the practical reasons for controlling the central squares,

“…the squares in the center of the board are the more important ones. The reason they are more important becomes apparent when the squares are considered in terms of a network of interlinked paths. It is clear that the player who controls the hub of the network can send his men from one side of the board, directly through the hub, to the other side of the board with ease. Whereas the player who does not control the hub must send his men from one side of the board to the other via devious routes, time-consuming routes. As time is an important factor in chess–that is, as it is important to reach a goal in the least number of moves–it follows that it is important to control the central squares.”

 

The question then becomes how it is best to do this. As mentioned by Horowitz, time is very important, and thusly you not only want to control those central squares, but be as efficient as possible in doing so. This leads us to the first rule in openings, which is that pawns are not developing moves. I’ll allow Aron Nimzowitsch (My System) to elaborate.

“A pawn move must not be considered in itself a developing move, but rather simply a move that aids development … However an advance without pawns is unsustainable, because our opponent’s pawn centre, thanks to its desire to expand, would repel those of our pieces which were already developed.”

We can by this rule determing that moves such as 1. a4 are incorrect, as they neither support development nor aid control of central squares.

 

Relating to efficiency, we can easily see that any piece can move to a position that attacks the centre in a single move, so a new rule emerges, our second, from this, which is only move a piece once in the opening. If you are moving a piece more than once, you’re being inefficient and wasting time.

Pieces have different strengths and weaknesses, and their values are relative to the position. This is best illustrated by the difference between knights and bishops. Knights are best utilized in closed positions where pawns are locked and manoeuvering is difficult, due to their nature of being able to leap over other pieces. Bishops, conversely, are best in open positions, particularly when still paired with the opposite coloured bishop. This leads us to our third rule, which is knights before bishops. Knights in opening positions tend to control more squares and are more mobile in opening moves.

 

A consequence of the leapfrogging ability of knights is the basis for a third rule of the opening, which is protect pawns with knights not bishops or pawns. Given a choice between a knight or either a bishop or another pawn, choose a knight to protect a pawn. A weakness of bishops is that a pawn in the way limits the scope of its attack; guarding a pawn with a bishop is to intentionally gimp it. Guarding a pawn with another pawn in the opening can lead to poor pawn structure.

Continuing on pawn structure, despite pawns not being developing moves, the purpose and utility of pawns is arguably the single most important concepts not just in the opening, but the entire game. In the opening, pawns dictate the flow of development; in the middle-game, they are the focus of position and tactics; and in the end-game, they are the deciding factor to end or draw the game.

To illustrate the effect pawn structure can have, consider the following common opening mistake by black,

 

Fig. 1-2

Fig. 1-2

1. e4 e5 2. Nf3 f6 3. Nxe5! fxe5? 4. Qh5+

 

We can see the resulting position (fig. 1-2) where black has no way to prevent a loss of material. If 4..g6 then 5. Qxe5+ Qe7 6. Qxh8 wins the rook. Alternatively, 4..Ke7 is even worse, losing to 5. Qxe5+ Kf7 6. Bc4+ and black has a lot of problems. The kingside has fewer pawns, so moving the f-pawn, particularly early, is often dangerously weakening. Having pawns support other pawns by necessity opens holes on the opposite colour and is a risk that must be assessed.

Opening Examples

Ultimately, by how different the strategies vary depending on the opening, it is necessary in order to understand the opening to go through some examples of the most common openings to get an idea of why the moves are played as they are. We will then look at an example game for each where one side goes wrong in the opening, leading to an early demise.

King’s Gambit

The King’s Gambit is an opening that was the most common opening in the 19th century when the popularity of romantic chess–playing wild attacking games with lots of sacrifices–was at its peak. It creates tactical positions that are dangerous for both sides. It is characterized by the sequence 1. e4 e5 2. f4

For the sake of this example, we will only look at the King’s Gambit Accepted where black captures the f-pawn. An example continuation here is the Muzio gambit; this is a sacrifice that is considered dubious (a poor move with correct play), but illustrates the kind of attacking chances the opening tends to lead to.

Fig. 2-1

Fig. 2-1

1. e4 e5 2. f4 exf4 3. Nf3 g5 4. Bc4 g4 5. O-O?! gxf3 6. Qxf3

 

This position (fig. 2-1) has black with a material advantage, but white has a very strong attack, bearing down on the f-file and black’s weakened kingside. This attack is a benefit of placing development above material. Numerically speaking, weighing a pawn at 1 and a knight at 3, the position is -2.0 in favour of black. However, with the positional evaluation in mind, it is more along the lines of a -0.5 to -1.0 position, meaning despite the usually game-losing material definite of 2 pawns worth, white is still well within fighting chances.

An example game is myself versus an online user username SKWERLY, 1. e4 e5 2. f4 exf4 3. Nf3 d6 4. Bc4 Nf6 5. Nc3 Be7 6. d4 O-O 7. Bxf4 Nc6 8. O-O Bg4 9. Qd2 Na5? 10. Bd3 b6 11. Rae1 c5 12. e5 dxe5 13. dxe5 Nd5 14. Nxd5?? Qxd5 15. Bxh7+! Kxh7 16. Qxd5

 

 

In this game, black pushes pawns along the queenside flank neglecting development and ceding the centre and even kingside to white’s discretion. White quickly completes development and his pressure immediately causes black to blunder. Black was doing just find until move 9, and just three wasted moves meant disaster. The key to black’s position in the King’s Gambit is essentially just completing development while withstanding white’s attack. Proper play and he’ll come out just find; the king’s defence is key. On white’s side, he has to worry about not being pushed back by counterplay, and not being overly aggressive, however tempting it may be.

Queen’s Gambit Declined

The Queen’s Gambit provides a good juxtaposition to the King’s Gambit in many ways. It starts 1. d4 d5 2. c4 offering up the c4 pawn. The most common response is for black to decline the gambit, and the position thusly remains relatively closed. There is no way for black to take the pawn and avoid white eventually recapturing, so there’s no material gain for a relative positional loss. There are fewer tactics and much more prophylactic play.

The classical defense is still common — though not without other options — and runs as follows

Fig. 2-2

Fig. 2-2

1. d4 e6 2. c4 d5 3. Nc3 Nf6 4. Nf3 Be7 5. Bg5 O-O 6. e3 Nbd7 7. Rc1 c6 8. Bd3 dxc4 9. Bxc4

 

The position (fig. 2-2) has white holding more space, while black has a tight defense. The key square for black is the d5-square to act as a strong central position for a knight, or force a breakthrough up the middle resulting in an exchange of pieces. Typically the capture seen on move 8 by black follows white’s development of his bishop to d3 in order to win a tempo. Also, black’s c-pawn in this an other variations will support the centre moving most often to c6 or in the Tarrasch variation, c5. Both sides will castle kingside as the queensides will be too weakened in terms of the pawn structure.

The game I’ll use as an example is another online game, this time against user “Leon”. 1. d4 d5 2. c4 e6 3. Nc3 Nf6 4. Bg5 Be7 5. Nf3 Nc6 6. e3 b6 7. Bxf6 gxf6 8. cxd5 exd5 9. Qa4 Qd7 10. Bb5 Bb7 11. O-O O-O-O 12. Rfc1 Rhg8 13. Nxd5 Qxd5 14. Bxc6 Bxc6 15. Qxc6 Rd7 16. e4 Qxc6 17. Rxc6 Rg4 18. Re1 Bb4 19. h3 Rf4 20. Re3 Re7 21. g3 Rfxe4 22. Rxe4 Rxe4 23. Rxf6 c5 24. a3 Be1 25. Kf1 cxd4 26. Nxe1 1-0

 

 

In this game, black developes his b1 knight to a bad square on c6, as it blocks the c-pawn’s support in the centre, then blunders on the proceeding move, as he by pushing the b pawn, he loses a defender of the knight, allowing white to capitalize with heavy pressure. 13. Nxd5 while complicated somewhat by the number of pieces and the discovered attack introduced, it is essentially just an exchange to win a pawn, as black is short one defender and loses a pawn as a result. At this point, white has a significant advantage, and leads to a further game-ending blunder. The game is straight-forward for white, making typical opening manoeuvres for the position, then following logically from there.

Reti Opening

The Reti opening is simply 1. Nf3. The reason I don’t choose a particular line for this opening is that most often it transposes into lines from a different opening. For example, 1. Nf3 d5 2. d4 Nf6 3. c4 and the game has transposed into the Queen’s Gambit.

We’ll take a look at a Reti-specific line wherein white takes a dynamic approach to controlling central squares referred to as hyper-modernism, popularized in the early 20th-century, with Richard Reti being a key proponent along with the likes of Aron Nimzowitch and Ksawery Tartakower.

Fig. 2-3

Fig. 2-3

1. Nf3 d5 2. c4 e6 3. g3 Nf6 4. Bg2 Be7 5. O-O O-O 6. b3 c5 7. Bb2 Nc6

 

In the example (fig. 2-3) you can see that unlike more classical constructs, white takes more of a distance approach. The main danger of the approach is that it’s easy to lose space. If white starts the game with 1. Nf3 it is a safe bet it will result in a kingside castle. If the game does not transpose into a Queen’s Gambit game, it’s also common to fianchette the kingside bishop. White will want to control the long diagonals and keep them open, while black will look to expand his space and break up white’s pawn structure.

For a specific example, I will choose one of the favourite games I ever played, which was using the King’s Indian Attack in this game, Zurahn – rattle.

 

1. Nf3 Nf6 2. g3 d5 3. Bg2 e6 4. O-O Bd6 5. d3 O-O 6. c4 c6 7. Nc3 Na6 8. Bg5 h6 9. Be3 Bc5 10. Bxc5 Nxc5 11. d4 Na6 12. b3 Qa5 13. Qd2 Bd7 14. Nxd5 Qxd2 15. Nxf6+ gxf6 16. Nxd2 Nb4 17. Ne4 Kg7 18. Rfd1 Rad8 19. e3 Bc8 20. c5 Nd5 21. Nd6 a5 22. Rac1 Nb4 23. a3 Nd5 24. e4 Nc7 25. f4 e5 26. d5 Nb5 27. Nxb5 cxb5 28. Kf2 exf4 29. gxf4 Rfe8 30. Ke3 f5 31. e5 f6 32. e6 Re7 33. Kf2 Kh8 34. Re1 Rde8 35. d6 Rxe6 36. Bxb7 Bxb7 37. Rxe6 Rxe6 38. d7 Re4 39. d8=Q+ 1-0

 

In the game, issues stemming from the opening permiate through the rest of the game. The passive 3..e6 followed by the awkward and misplaced 4..Bd6 attacking an overprotected g6 pawn allow white to get the jump. On white’s side, though, 8. Bg5 is pointless without intention of capturing on f6, because the bishop would be trapped after 8..a6 9. Ba4 b5. Finally, if you look at the position as of move 16, we see black has a very bad bishop and a knight on the flank, along with doubled pawns on a weakened kingside. White alternatively has a strongly placed bishop, a knight a little back, but out of danger and ready to join the attack, and a safe king to add to the pawn material advantage.

English Opening

Another opening identifiable by its first move, the English opening is 1. c4. This was my stomping ground for learning the openings; it is relatively easy to open with a solid position, but it’s not without the opportunity for tactics. There are transposition options as well, and being the fourth most common opening, it is relatively unexpected at lower levels. Typical lines play like a reversed Sicilian, with white performing a fianchetto on the kingside bishop if not both sides, and often castling kingside early.

To show the dynamics of the position, we’ll look at one such common development from the opening.

Fig. 2-4

Fig. 2-4

1. c4 e5 2. Nc3 Nf6 3. Nf3 Nc6 4. g3 Bb4 5. Bg2 O-O 6. O-O

 

The basis of all developments surrounds the e5 pawn and handling the potential push to e4 attacking the f6 square. Because of this, I am partial to playing an earlier e6 in this or similar situations as opposed to castling first, which in this case would follow 6..e4 7. Ng5 Bxc3 8. bxc3 Re8 9. f3 exf3 10. Nxf3.

A temptation in this opening in particular is to play a stonewall, which is to say two forward pawns creating a backward pawn to protect them. For example, 1.c4 e5 2. e4. This is a poor move and rarely is this kind of position beneficial. Backward pawns are weak and targets, and this position creates holes in the defence and control of the centre.

Illustrating how white can go wrong in the opening, I have an example of Big Cat – Zurahn.

1. c4 e5 2. Nc3 Nf6 3. Nf3 d5 4. cxd5 Nxd5 5. e4 Nb6 6. d3 Nc6 7. Be2 Bc5 8. O-O Be6 9. Bg5 Qd7 10. Be3 Bd4 11. Ng5 h6 12. Nxe6 Qxe6 13. Bg4 Qe7 14. Re1 Rd8 15. Nb5 Bxb2 16. Rb1 Bd4 17. Nxd4 Nxd4 18. Bxd4 Rxd4 19. Qf3 O-O 20. Qe3 Rfd8 21. Be2 R8d6 22. f4 exf4 23. Qxf4 c5 24. e5 Rxf4

 

Here we see relatively typical developments, but 5. e4 is a little odd. But the key problem is following that with 6. d3, creating a backward pawn and a perminent weakness on d4 that exploited for the entirety of the game. It’s not losing unto itself, typically none of these opening errors are, but they mean white has to play more accurately to keep up. The harder you make it on yourself, the more often you’re going to make a mistake.

Sicilian Defense

It is common that a defence is dependent on white’s opening, and characterized as such, as seen in the Queen’s Gambit, for example, where black’s choice is simply accepted or declined. However, there are instances where black’s choice are so prominent that they warrant a name of its own. Such is that of the single most common opening in high level chess, that being the Sicilian.

The Sicilian Defense is simply 1. e4 c5. It creates an imbalanced position where black has a lot of control over the flow of the game. There are various lines of play, but there are common themes.

I’ll use the Sicilian Accelerated Dragon variation as an example.

Fig. 2-5

Fig. 2-5

1. e4 c5 2. Nf3 Nc6 3. d4 cxd4 4. Nxd4 g6 5. Nc3 Bg7 6. Be3 Nf6 7. Bc4 O-O 8. Bb3 d6 9. f3 Bd7 10. Qd2 Rc8 11. O-O-O

 

Here, while this is just one specific line, there are several moves and themes common to the opening lines as a whole. White is a general rule always follows 1..c5 with Nf3 followed by d4. There are complications if he doesn’t. Similarly, white almost always castles queenside while black kingside, if at all. The black g8 knight develops to f6, but the b8 knight depending on the variation may develop to d7. This all culminates to a pawn rush on the kingside by white, while black has counterplay on the queenside.

The example game here is against a chess engine. Modern chess engines are terrific in the opening not because of processing power and the quality of the algorithm, but because of near-perfect opening books. An engine not making good use of an opening book can run into problems. The game here is Zurahn – ProDeo 1.1.

1. e4 d6 2. Nf3 c5 3. d4 Nf6 4. Nc3 cxd4 5. Nxd4 g6 6. Be3 Bg7 7. Bc4 Nc6 8. Qd2 O-O 9. f3 Bd7 10. h4 Rc8 11. Bb3 Ne5 12. O-O-O h5 13. Rdg1 a5 14. a4 Nc4 15. Bxc4 Rxc4 16. g4 hxg4 17. h5 gxh5 18. Bh6 Rxd4 19. Qg5 Ne8 20. Rxh5 f5 21. Bxg7 Nxg7 22. fxg4 e5 23. gxf5 Qxg5+ 24. Rhxg5 Rf7 25. f6 Bc6 26. Rxg7+ Rxg7 27. Rxg7+ Kf8 28. Nb5 Bxb5 29. axb5 Rxe4 30. Rxb7 a4 31. b6 Re1+ 32. Kd2 Rb1 33. Ra7 Rxb2 34. b7 d5 35. Ra8+ Kf7 36. b8=Q Rxb8 37. Rxb8 Kxf6 38. Ra8 Ke6 39. Rxa4 Kd6 40. Ra6+ Kd7 41. Kc3 Ke7 42. Kb4 Kd7 43. Kc5

 

We can see that there are a lot of typical development moves, but it seems the book runs out too early for ProDeo as it begins grabbing materialistically and ignoring the danger of a kingside attack. White’s position is quite comfortable for the king while the pressure builds up on black. If there’s one move that hurt, it was 14..Nc4, trading off a well-placed knight in the centre of the board for the sake of breaking up the bishop pair. In the Sicilian Dragon and Accelerated Dragon variations, white intends to trade off the dark-squared bishop, anyway, so losing the bishop pair is less of a concern.

King’s Indian Defense

Another popular high-level opening, it’s a response to white’s 1. d4 with 1..Nf6. Though the position is largely positional in nature, it can quickly become a tactical headache. Black will early on get himself into a crampt position, but will have the opportunity to gain space on the kingside. This becomes a bit of an arms race where white presses the queenside while black looks to break through on the kingside.

 

Fig. 2-6

Fig. 2-6

1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 d6 5. Nf3 O-O 6. Be2 e5 7. O-O Nc6 8. d5 Ne7

 

From here, there are a few different routes to take, such as 9. Ne1 (Mainline), 9. b4 (Bayonet Attack), or 9. Nd2 (Classical), but all routes lead to white and black attacking the opposite side. Your common themes are black manoeuvering his knights on the kingside to support a pawn storm, and white breaking through on the c-file, and not maintaining a knight on f3.

The King’s Indian Defense is a very precise opening, so much deviation from the typical solid moves can lead to problems. We’ll see this in Rorticus – Zurahn where white gets too aggressive.

1. d4 Nf6 2. c4 g6 3. Nc3 Bg7 4. e4 d6 5. Nf3 O-O 6. e5 dxe5 7. Nxe5 c5 8. d5 Bf5 9. Bd3 Nxd5 10. Bxf5 Nxc3 11. Qb3 Bxe5 12. bxc3 gxf5 13. Bb2 Bf4 14. Rd1 Qc7 15. g3 Qe5+ 16. Kf1 Qe4 17. Rg1 Bg5 18. Re1 Qf3 19. Re3 Bxe3 20. Ke1 Qxf2+ 21. Kd1 Rd8# 0-1

 

The problems for white begin with 6. e5. It’s the first move out of book, and for good reason it’s not the typical move here. If black recaptures with the d-pawn, the trade of queens leaves white unable to castle, so the forced second move of the knight is what is played. Black plays the correct continuation c5, which forces the removal of the d4 pawn from defending the knight on e5, which will become threatened by the bishop on g7. Again this leads into a difficult position, where white blunders with 10. Bxf5 which leads to a winning advantage.

Conclusion

The opening isn’t the only facet of the game. In fact, at high levels, the first 10 moves or so most often are irrelevant, and even criticised for making the game about memorization as opposed to over-the-board evaluation and creativity, helping give rise to Fischer Random Chess. That being said, until your at that Master or higher levels, knowing the fundamentals isn’t going to be that simple. It affects the outcome of the rest of the game, and at the least makes it easier or harder depending. Basic concepts like Knights before Bishops before Rooks before Queen, controlling the centre, defending the king, and the important of tempo all give you a leg up over anyone who is unfamiliar with them. With simple, solid opening play, you’ll start to see games decided before you’ve even really had to think, and that’s something to think about.

My Dream

Filed under: Life — Zurahn @ 11:34 pm

I’ve essentially spent about 6 years failing to find work. During this time, I have managed to hold two actual jobs. The first lasted a span of 2 months: I didn’t apply there (must have been forwarded through a student job board), started literally within half an hour of the call, got no training, and then got placed on call and never called again.

The second was in a call centre where I’m fairly sure they would have hired a spambot if the application were done online.

During this time, starting from mid-highschool, I obviously graduated high school (83% average, Principle’s Award for honours every year), then graduated college in web application development (GPA 3.4) in April of 2008. I’ve gone through half a dozen resume formats, gone through a job search course in college, gone through a government job search program. I’ve gotten nowhere.

From that time, I haven’t had a single interview in the field. I am presently at University for Computer Science, not really out of any specific aspiration, but with the sense of having nowhere else to go.

My whole life I’ve managed to be a realist. I can’t say I’ve ever really believed in anything ridiculous along the lines of Santa, Tooth Fairy, God. Despite loving baseball, I never had the aspiration to be professional as many children allegedly do, as there was no way that was a reasonable expectation or practical career path.

The same can be said for pretty much all the favourites. I’ve been preparing myself for one, rather specific dream: To live alone in a small city apartment, with a lower-middle class position and wage pertaining to the field of computers. There’s no concern to be rich or even just relatively highly salaried; no expectations or drive to fame; no delusions of ever finding love.

I’ve set the bar as low as I can, and I’ve failed miserably.

January 6, 2010

An Ugly Side of Web Development and Design

Filed under: Computers — Tags: , , , — Zurahn @ 11:02 pm

I’ve got time to kill, so indulge my ramblings.

For those who don’t know the world of web development, it’s probably doesn’t work the way you’d think. There are three aspects of web development: Presentation, Logic and Data. Presentation is HTML, CSS, JavaScript — anything that’s run on the client computer; logic is the server side deciding what it needs to do when you visit a page, and data is whatever’s stored on that server to actually provide the user.

The tricky thing here is that you can call anything done on th server-side programming, and JavaScript is a programming language, but the primary aspects on the presentation side — HTML and CSS — aren’t programming languages; they are markup languages. Browsers follow rules that say how the HTML and CSS are supposed to look when used in specific ways, but sometimes those rules are ambiguous, sometimes the browser is wrong, sometimes the action is unspecified, and sometimes the browser just hasn’t implemented the functionality.

This leads to some weird and unique problems and solutions. For example, there is a generic container element in HTML called a DIV tag. You can put anything you want in a DIV, and you can use CSS to style it so it has, say, a black background and white text.

Well, if you say “height: 100%”, that doesn’t work as cleanly as one would hope. If you take a look at The VG Press forum, you’ll see the user information in a sidebar on the left with a darker grey background and a border to the right. Because you can’t just set the height of the sidebar to 100%, how do you get a perfectly flush border and background like that? You have to do a clever, silly and stupid workaround wherein the DIV that contains the sidebar DIV is given a background IMAGE containing both the background colour and border, repeated vertically only. Weird, but it works.

Let the chain reaction begin, though, as a big feature I’m working on is full customization of presentational aspects including colours. Remember that the sidebar background and border is an image, so you can’t just change the colour — what then?

After several weeks of not knowing how to solve this, I now have a solution. In PHP (a server-side programming language), you can create images. Thusly, how I could get around this would be to generate a new sidebar image with the colours specified and cache the image on the server. So if then user specifies a sidebar background colour of #FFFFFF (white) and a border colour of #FF0000 (red), when the user saves his settings, the server receives the request, generates the image, and saves in on the server as FFFFFF-FF0000.png. Then if another user chooses the same colour combination, that file is used, otherwise a new one is generated. Automatic, transparent, efficient and completely obtuse. Gotta love it.

December 13, 2009

Fixing Ugly Web Fonts in Ubuntu

Filed under: Computers, Freeware — Tags: , , , , , , , — Zurahn @ 9:00 pm

In Ubuntu and its related distributions, the font rendering has gotten pretty good so that you don’t have to do much tweaking. However, there may be some nagging ugliness while web browsing if you prefer sharp fonts, and no matter how much you adjust the settings, it’s not going to get fixed. It’s not because of the web browser or desktop settings.

So, what’s going on here? Well, it turns out Ubuntu by default has versions of typical Microsoft fonts installed, such as Arial, Verdana, Courier, etc. and they all look like crap. For whatever reason, they do not alias properly and end up with ugly blurry asymmetric edges. By just getting rid of these fonts, everything immediately prettifies by falling back on default free serif or sans serif fonts.

What we’ll do is move the font folder containing the fonts to a backup folder in your home directory.

sudo mv /usr/share/fonts/truetype/msttcorefonts /home/[USERNAME]/backup

Restart your web browser and behold a much prettier Internet.

December 8, 2009

Is this how it’s supposed to work?

Filed under: Life — Tags: , — Zurahn @ 3:09 am

Something in the past few years has happened to me, and it’s been a struggle to define or explain it.  The majority is a topic for another day, but in the end I can say I definitely have a greater breadth and capacity for emotion and caring far beyond anything prior.

Consistently I am able to be moved by all kinds of mediums unlike anything before.  Movies, music, games, books, whatever can reach me.  Highs and lows, joy and tears.

But that is all in the moment.  Before it starts and when it ends, I am a shell.  There’s nothing left over but to wonder where it went and what to do next.

Individual things make me happy, perhaps at a moment, moreso than ever before, and yet I’m not happy.  I’m lost.

A few weeks back I legitimately had an epiphany.  Being conflicted on many issues that I couldn’t wrap my head around, I finally stumbled on the basis, the foundation for everything I feel.  Making others happy is more enjoyable and satisfying than anything else could ever be.

Somehow it’s not quite like the movies.  Knowing why doesn’t solve the outcome.  It’s a bit of a paradox really, wanting to help others while having no desire to have anything to do with them personally.  At least I’m on the right career path, should that ever amount to anything.

Sorry, this is a bit of ramble, but is this how it’s supposed to work?  Hopping from emotional stimulant to stimulant in order to grasp at a brief moment of joy before it vanishes back into nothingness?

« Newer PostsOlder Posts »

Blog at WordPress.com.