Swing

This post is for the beginning java developers out there. At the least those that are familiar with the basic concepts of java and have written a few text based programs.

I’m more then once asked how it is possible to create a GUI with java code. Well there are a few ways, the most commonly used (I think at least, it’s the one I always use) is Swing. This is the primary Java GUI toolkit, it contains an API which contains a graphical user interface (needless to say).

It was developed to provide a more sophisticated set of GUI components than the, older, Abstract Window Toolkit (AWT). Swing will provide a native look and feel that will work on several platforms. If you OS runs java, it can run Swing. In addition to the standard buttons, check boxes and labels it provides several other components as well like a tabbed panel, scroll bars/panes, trees, tables and list boxes.

Is it hard to use? I’m going to be honest with you.. Working with Swing will grind your gears at first. It’s rather simple but it can get very complex very fast. You really have to keep your head to your work when writing code like this. It is wise to put some documentation lines in your code just to remember why you did certain things.
But like most things, once you get used to it, you will love it.

What can you do with it? I would dare to say.. Anything.. If you can create it in java code you can put a GUI over it. You can even write games with java code and swing. (I’ve seen code to create tetris, pac-man, etc).

I found one website which provides some very nice tutorial code. From very easy to very hard (it even has the “create a game” tutorial code).

You can check it out here: http://zetcode.com/tutorials/javaswingtutorial/.

If you want to learn java coding with swing, there is only one way to do it. Try it, work with it, write code until your fingers bleed.

Story Telling

Today I want to show you a piece of software which is not so commonly asked for. It is purely meant for screenwriters. This software is designed to accelerate the process of creating screenplays and, in the end, deliver finished media.

The software designer: Adobe
Name of the software: Story
Cost: nothing (how cool is that)

There are a lot of great programs out there to support you in screenplay writing, but for a beginning screenwriter this can be quite expensive. This is why Adobe Story is a great and free alternative which also allows you to schedule tasks and report on progress.

Adobe story can also be used when working with writing teams since it is possible to share projects.

Basically this tool allows you to take care of your entire production process. From pre-production to post production.

Since I’m not familiar with screenwriting or producting a series or a movie, it seem wise to show you a few tutorial movies of Adobe Story.

Enjoy!

The IEEE 802.11b Direct Sequence

Now that you’ve had a few basics on radio waves we can take it one step further. The title of this post probably doesn’t tell you a lot, although I’m very sure that you know what it is. Just by a different name: WiFi. This name has been commercially used since 2000, it was used because it just was catchier than the IEEE 802.11b Direct Sequence.

WiFi uses, just like your cellphone, radio, etc, radio waves. As a matter of fact, the transferring of data between a computer and a WiFi device happens very similar compared to send a radio signal. The computer’s wireless adaptor translates data into a radio signal and sends it’s via an antenna. The wireless device (a router for instance) receives the signal and decodes it. The router send the information to the internet by using a wire, the Ethernet cable. Needless to say this process also works the other way around.

Although very similar to radios, there are some significant differences from a “normal” radio. For example, wireless routers for instance transmit at frequencies of 2.4 GHz or 5 GHz. This is a lot higher than the frequencies used for cell phones. This high frequency allows the devices to transfer a lot more data. To give you an idea the 2.4GHz (which is the 802.11b standard, just putting this here as a side note) can transfer up to 11 megabits of data per second. While the 5 GHz version (802.11a standard) can carry up to 54 megabits per second.

And frankly, for the basics.. That’s all their is. Connect your computer to a wifi hotspot and you’re off :).

Surfing the Waves

There is no escaping it, all around us all sorts of equipment are emitting radio waves. Think about it… Cell Phones, GPS Receivers, police radios, TV broadcasts, and so on and so forth.
Although radio waves are invisible, they have completely changed our lives. If you are not convinced that these waves (surf’s up!) exist try the following.
There is a very easy experiment you can do yourself to send a signal via radio waves.

Take a 9-volt battery and a coin. Find an AM radio and tune it to a frequency where you can only hear static. Hold the battery close to the radio’s antenna and quickly tap the coin to the battery’s contacts (let them only touch for a moment).
The moment the coin (dis)connects the battery you’ll hear a crack on the radio. This is cause by the signal that has been sent via the battery/coin combo. It’s not very useful and frankly it won’t go any far, but it’s there.

As you noticed, it’s fairly simple to transmit with static. But you can imagine this forms a problem. There are so many devices out there broadcasting signals that at some point they will interfere. That’s why all radio transmitters today are using something that is called a continuous sine wave. Each radio frequency is using a different one and that is how they are kept apart.

Any radio setup works like getting married. You can’t do it alone. So any setup has 2 parts. A transmitter and a receiver. You probably already figured out that the transmitter sends a message (which really could be anything, a voice, pictures, whatever) by encoding it into a sine wave which is transmitted by radio waves.
The receiver, of course, receives the message and decodes it. Both devices use an antenna to send or receive the signal.

Radio waves where first “predicted” by a man called James Clerk Maxwell. He did some serious mathematical work in 1867. This man noticed the wavelike properties of light and the similarities in electrical and magnetic observations. After this observation he proposed a set of equations that described light waves and radio waves as actual waves of electromagnetism that travel in space.
Heinrich Hertz (ring a bell?) proved the reality of Maxwell’s electromagnetic waves by generating radio waves in his laboratory (I’m telling you he was 1 lab accident away from being an super villain).
From that day forward new inventions were created and it brought us were we are now.

Size Matters

Did you ever stop to think about the amount of data available on the internet? Imagine this next time you run a google search: the moment you type in your query, you send one of the 2 million searches that Google receives per minute. In the same amount of time Facebook users post, roughly, 700 000 new pieces of content and online shoppers spend about $ 280 000.

Most of this data is not structured, which means that it is not properly ordered, doesn’t have the same setup or doesn’t come in the same format. Which is a shame, because this big pile of data contains very useful information, specially for certain companies. Suppose that you have an amazon store and you sell a line of products. As you may know, amazon users, in other words your consumer, can leave positive or negative comments. You can imagine that this is the information you are looking for. It’s right there, the only problem is capturing it in a structured way.

This “big pile of data” is knows as Big Data. To summarize, a big heap of unordered data. This, as stated earlier, forms a problem for companies. Since they are used of working with “conventional” databases such as a relational database or datawarehouses, where everything is predefined and nicely structured. They now have to deal with customers blabbing about their products on the internet without the possibility to capture it.

In order to solve this Big Data tools are developed and are still being developed as we speak. These tools are designed to work with loose data with no rules or boundaries. These Big Data tools are used in the category of Business Intelligence. In other words they are used to analyze data and capture an image about what is going on. There is however one big different with conventional Business Intelligence based on a datawarehouse. Since big data is not structured, it’s very hard to give exact and correct numbers. While a normal datawarehouse (which has been set up correctly) can give you exact numbers about sales, costs and all of that, big data tools can only give you an idea of what is actually going on. They have a more predictive task rather than being able to detect trends or to measure things.

There are many industries out there that already use big data. The gaming industry (I’m a nerd I know) uses big data to track data before and after gameplay and to predict performance. Supermarkets are using big data to create personalized folders for their customers. Even the ideal place to place a product can be predicted using big data.

Fun story, a few years ago, a reasonably large supermarket conveyed a study. They wanted to find patterns in the way that people buy products. For example, if you buy a printer you’ll most likely also buy ink for this piece of hardware. One of the most surprising outcomes was that if diapers where bought, chances were high that a crate of beer was also bought. Reason? Apparently it’s mostly men doing the diaper shopping and while they are add it they also refill their “to-coop-with-reality”-stash.
Result? While the diapers where placed in the front of the store, the beer was placed way on the other end of the story. Not consumer friendly? No probably not, but it was a great boost for the sales figures.
Because the supermarket “forced” people to go through the entire store to get what they need, they took along other things that they initially weren’t planning on buying.

In other words, like I said so many times before, be wary of what you post on the internet, because big brother is indeed watching you ;-).

Cleanality!

Retro Gaming – ZORK

As Sheldon from the big bang theory states. Zork is a game that runs on the world’s most powerful graphic chip: “Imagination”.

Zork is one of the first, completely text based computer games. The very first Zork was written in 1977 – 1979 using the MDL programming language on the DEC PDP-10 computer.

The programmers were all members of the MIT dynamic Modeling Group. The reason why I’m telling you this is because I can explain were the name ZORK came from. Initially ZORK was MIT hacker slang for an unfinished program. Once the game was finished, the game was briefly renamed to dungeon. But after a while it changed back to ZORK because they received a trademark violation (Dungeons and Dragons).

Zork is set in the ruins of an ancient empire lying far underground. You are venturing into this dangerous land in search of wealth and adventure. The goal of the game is to return from the great underground empire alive, preferably with a lot of loot. The dungeons you wander through are stocked with many creatures, objects and of course locations.

How it works, well it’s quite simple. You are told in which location you are and by typing commands you can interact with the game. Commands like pick up swords, go north, slay dragon, etc. You get the idea.
This sounds quite boring I know, I has the same idea when I heard about it for the first time. But the truth is, it’s actually quite entertaining.

As usual all I need to do is to show you the gameplay. And believe it or not, I actually found a youtube video of a guy playing this game. So here you go.

If you want to play this game, you can play it from this link:

http://www.newgrounds.com/portal/view/188334

As you can see there are 3 games available on this link. Zork is actually a trilogy. Believe it or not, it was quite a success. Like I said earlier, this can really give you hours and hours of fun once you get into it.
A small heads up, suppose you get hooked to this sort of game. There are quite a bit of other text based games out there. On top of that, besides the original Zork trilogy, there where some other additions to this series. Like the “return to Zork”. Which was no longer text based but graphical.
The last Zork game was made in 1997 and is called Zork Grand Inquisitor.

Well the only thing left to do now it to play the game ;-). Have fun!

GTA 5

We’ve been talking about this game series before and in September a new installment of this game will be released.. I’m thrilled!

A few days ago some gameplay footage was released, check it out:

Abandonware AKA Free stuff!

Just like we do, software has a life cycle. It’s designed, developed, distributed, hated, fixed, sometimes loved, forgotten and never used again. When software reaches the last phase: “forgotten and never used again” it often becomes abandonware.

This means that the software hasn’t changed but the producer simply doesn’t supports or sells it any longer. This is why it becomes legally impossible to buy it. Which most of the times means you can find it on the internet for free. Do keep in mind that there is nothing that says it’s legal to “just download it” from the internet. But let’s face it, the changes that the producer of this old software is “out to get you” is very very small.

As a result there are a lot of websites out there that offer “abandonware”. Like for example Abandonia, which can be found here. This site offers you mostly games (fossils) which allow you to revisit your childhood memories.

Go on, have a go ;-)..

How to fix the internet

If I told you how many phone calls I get about “the internet that isn’t working anymore” you would feel sorry for me. Although the solution is most of the time very simple, most people just don’t seem to succeed in fixing “the internet” on their own. This is why I decided to write a few guidelines to follow whenever you are unable to connect to the internet.

Perhaps it’s a good idea to print out these few lines or copy them to a offline document because, as you know, you won’t be able to visit this page whenever your internet connection is down ;-).

1. Did you try turning it off and on again?

This is actually a very good one. I’ve told you this on many occasions because it simply works. Sometimes something random goes wrong in a program, hardware, whatever which results in technological confusion. The first thing to try is to pull out the plug wait a minute and plug it back in.
So if you are connected directly to a modem, unplug the modem and wait for a bit. If you are connected to a router, unplug that thing. If that doesn’t work, unplug the modem, router and all other related network devices and plug them all back in. 8 chances out of 10 the internet connection will be fixed again.

2. Is it plugged in?

I think the title speaks for itself? Check it and if it isn’t plugged in, don’t tell a living soul. Bringing me to the next topic:

3. Is it connected?

This is mostly for WiFi users. Did you check if your computer is actually connected to a wireless network. Again, if it isn’t, connect, don’t tell a living soul. If all of above did not work:

4. Check your IP address

Do you have a valid IP address? This is very easy to check. If you are on a windows computer, open a command box (press the window key + r, type cmd and hit enter) and type ipconfig. You see a lot of information popping up and one of the lines is IPv4-address which will or at least should show you a series of numbers, something like 192.168.1.5.
If the IP address is something that begins with 169.254 then, and I’m quite sure of this, the IP address is wrong. This happens a lot on a WiFi network. If you entered a password to connect to a wireless network and the password is wrong it could be that you still get connected. Because of this you’ll get a false IP address. Disconnect and reconnect with the correct password in order to resolve this. If you see something like medium not connected, go back to step 2.
By the way, the command on Linux and Mac is ifconfig, you can run this command in the terminal (although I believe you have to do this as the root user).

A small side note, if your IP address is 0.0.0.0 then this also means your cable/wifi/whatever is not connected ;-).

5. Does it blink?

Most network devices have LED lights which show connectivity, power, connection to the internet, etc. If you are connected to a router, check the router and check if the “connected to internet” light is on. If it isn’t, it means there is actually something wrong with your internet connection. Next step is to check the modem. First of all check if it is on, if it is check if all the light are on (check the manual to figure out which are the ones that need to be on).

6. All is lost, you’re allowed to panic now

If all of above didn’t work or if your modem is completely dead, call your ISP. They can help you out ;-).