Sunday, December 23, 2007

Next Task For BlakeNet

In case some of you havent been keeping up, BlakeNet is the webserver project Ive been using to test and build my various programs, especially LeetBoard. However, a new idea has been discussed recently. A while back, my good friend affectionately nick-named Squirrels and I had talked about how great it would be to start a website where we could just put stupid stuff to make other people laugh and generally have fun with it. We never got around to purchasing hosting and creating the site.

But, last night, he mentioned the idea again, and I suggested we use BlakeNet and purchase a domain name, which is a much cheaper solution compared to buying hosting. We arent sure when we will be doing it, but hopefully this time we will get around to setting things up. The name of the site is still undecided. As for what it will be about, well, Ill keep that a secret to build suspence.

Saturday, December 15, 2007

Building A Multi-User Application

Ive been working on a little project lately to test communication between one computer and another through the internet. This was a great opportunity to use BlakeNet. The plan was to host a daemon process that listens on a given port, accept incoming communication requests, and reply to messages sent to the server. The server program was programmed in Java, and the client program was originally programmed in Flash, but later I decided to create a second version in Java.

Working on this project brought up an interesting quirk about multi-user applications, though. It turns out, in the case of Java, at least, that ports can only have one persistent connection at a time. All other connection requests on that port are queued, and are only allowed to open once the current connection closes. There are a couple different ways of getting over this problem. Im still considering which one to implement.

The first is to have the server continue to listen on one port, and have the server constantly kill the current connection, accept the next one in the queue, communicate, kill it, and repeat. This means the clients, in order to have semi-persistent connections, would have to send in another connection request each time the current one is killed. The problems with this is it has the possibility of being very bandwidth- and cpu-intensive, may lead to "greedy clients" who skip ahead of others in the queue and cause them to get more attention than other clients, and might lead to a loss of clients since theres a limit of 50 (or less, depending on the operating system) connection requests per queue.

The second is to have the server listen on one port for connection requests, then assign each request to its own port. This is probably the best way to go, but it does have its pitfalls. The biggest one is that having so many ports open, and only having one program to maintain all of them, can be a disaster to processing speed. The other, less significant problem is that there are only so many ports you can use. Ports 0-1023 are registered for use with system protocols and require superuser privileges to use, and ports 1024-49151 are registered for use with commercial programs. This means, under the worse-case-scenario, only 16382 or less connections can be allowed (ports 49152–65535, minus one for the connection request port). That is way more than needed, probably. But, limits are limits.

The third is to just create a peer-to-peer style application. The server will only be responsible for registering clients, and telling other clients of where to find them. All actual communications will be done between the clients themselves. This can lead to the client computers lagging and also leaves a lot of things up to the client to configure, especially security-wise. This is also similar in structure to the first proposed solution. So, this choice is definately out.

I think the best way to go is the second choice.

Thursday, December 06, 2007

BlakeNet Up Finally

Im proud to say BlakeNet is now finally up! It is still under heavy construction. As of this posting, it only has a placeholder index page. Expect to see LeetBoard up on it, along with possibly a working website just for the fun of it!

BlakeNet will not be up 24/7. As such, Ive added a new item to the sidebar that lets you know if the server is online or offline. When it is up, you can access it by clicking the link in the sidebar, or going to this IP address. Right now, it is only accessible by IP. I might buy a domain name for it later, but it isnt really on my todo list.

Tuesday, November 27, 2007

Back From Georgia

I came back home from Thanksgiving break in Georgia yesterday. Surprisingly, I really enjoyed the time with the family. I hope everyone had a nice Thanksgiving as well!

I brought two things home with me from Georgia. One is a little 6-week-old kitten we named Gracie (I might talk about her more later, or even post some pics), and the other is an old computer my aunt was planning on scrapping. It has some interesting family tree info on it she wanted me to pull off of it first, but after that, it is all mine. The reason I decided to take it home is because it has a PCI Ethernet adapter, which if you recall I have been looking for to connect my server to the network/internet. I will be doing some more work with the server and seeing if I can get the adapter working with it over the next couple days.

Thursday, November 15, 2007

Me? A Teacher?

Earlier in the year, I suggested the idea of teaching GML (Game Maker) to the Programming II class. The teacher, Mr. Allen, decided that the first semester, he would teach the class Java, and the second semester, I could teach the class GML. Today, he gave me a 17-day timeframe to come up with a basic lesson plan to use after Christmas break. Im so excited to finally be able to share my infinite wisdom of computers with a class. :p

If I come up with a lesson plan that I feel like sticking to, Ill be sure to put it up on BlakeNet, along with select projects created by the students of the class.

Wednesday, November 14, 2007


Saturday, November 3rd, I got bored and decided to completely clear off one of my old computers, install Linux, and get a server going. The next day, I installed and configured Apache, PHP4, and MySQL. What took me two weeks to post this? Well, Ive been busy working with the hardware of the machine.

The computer did not have an Ethernet adapter, so I got one from one of my dad's old work machines. The problem is the adapter is ISA, which Linux doesnt exactly like, and the ISA port seems to have issues with the adapter plugging into it fully. Either of these could be the cause of the problem. So, after two weeks of fighting it physically and digitally (with the immensely appreciated help of the LaunchPad help group), I have finally reached boiling point and trashed the card. Now, Im looking for a PCI Ethernet adapter.

In the meantime, I will be working offline with LeetBoard and a couple of my site concepts. When I find the adapter, you can check out the progress first-hand. The server, and inheritantly the website from which all of this material will be available, will be refered to as BlakeNet. Yes, its a pretty lame name. Ill come up with a better one when I have time to stop and think about it.

Saturday, November 03, 2007

Playing The Oldies

Well, I decided to head into my room today and untangle the mass of cords all huddled up in the corner. After sorting them all out, I got to touch my old SNES and NES from way back in the day. I dusted them off and hooked them up, and sat down, ready to play.

Unfortunately, I couldnt get the SNES to play on my TV correctly. Ill have to work on that more later. But, I DID get the NES fired up, and after a few savage beatings, I actually got to play some of my old favorites. Super Mario (one and three), Mission: Impossible, Star Tropics, and even Solstice! It really took me back to the good ole days. I plan to take a break from the Wii for a while to just take in all of the glory of the old, crappy games we used to play and love to remember.

If any of you have an old system that may still have a chance of functioning, I suggest you wrestle it out and play it for a while too. Halo 3 wont miss you that long. ;)

Sunday, October 21, 2007 Down

Today, reached the end of its lifespan. This includes the LeetBoard beta testing. Myishi vets can still use the old forum, although it may not be very active. We encourage all vets, newer members, and old allies to get MSN Messenger and keep in touch with us through it. If you have it, but dont have any of our addy's, e-mail me.

The shutdown of the LeetBoard beta will drastically affect the development of the software. I will be setting up a new site for testing soon enough, but for now development of the project is suspended.

It's been fun!

Wednesday, October 10, 2007

Recent LeetBoard Updates

Lately, I have been working quite diligently on LeetBoard. As a result, four new features and fixes have been implemented today.

The first is the moderator macro feature. This allows administrators to set up shortcut operations, or macros, for board moderators. The macros can pin, lock, move, and reply to topics. Macros can be limited to a specific forum or forums, usergroup, or a combination of the two. In the future, the power of the mod macros will be expanded to allow actions to be taken on the posters themselves.

Second, we have polls ready for use in topics. Polls can be appended to regular topics where they are allowed. You can read more about this feature in the previous post title LeetBoard Tech: Polls.

Next up is the post title/description issue. It turns out there was an error with how the title and description of new topics were being processed, causing them to display strangely if certain reserved characters were used. This also lead to both fields being cleared automatically upon previewing the new topic before posting.

Finally, another fix for the smiley system. This issue involved the "Show All Smilies" link missing from the Editing Topic form.

I will continue to work on the LeetBoard software. Each day it gets closer to completion. A special thanks to the Myishi Corp community for their continued help in beta testing the software and feedback. For additional feature updates, check the todo list.

LeetBoard Tech: Polls

Many message board softwares allow their users to create polls that allow other members of the board to read a question and decide amoung several choices provided. LeetBoard now supports this same feature. A user can provide a poll question, along with a minimum of 2 or maximum of 6 options, to be appended to the top of a topic. The options may contain BBC and smilies. After voting, the users can then view a pie chart rendered on-the-spot that shows the current poll standings including the total votes, and number and percentage of votes per choice.

Thursday, October 04, 2007

MC Closing Again

Well, it seems Myishi Corp is going down for the count yet again. This time it will probably stay down. Even though I sort of expected MC to run out of steam so early in its revival, it's still pretty sad to see poor ole Myishi going out for the, what I guess to be, third time in it's on-off life.

As there is no point in having a website for a corporation that no longer exists, will be dissolved after the latest payment on the hosting and registration expires (which should be sometime near the end of October 2007). This means the forum will also be pulling a vanishing act, which will effectively end this round of LeetBoard development. I will be starting a new website somewhere down the line where I will continue development of the project. But, until then, the only place you will be able to see anything LeetBoard-related will be here. For anyone who is reading this and was a former member of MC, the old forum will still be up, although I will not be actively administrating it and very very few others will be using it. We prefer you get MSN/WLM and chat with us using it instead.

Monday, August 27, 2007

Retargetting Images

I just had to blog about this. This technology is awesome. Basically, its like resizing an image, except instead of just subtracting rows and columns of pixels, the program seeks the best pixels to remove, that way the image doesnt appear lop-sided or otherwise deformed. It also works for enlarging an image. Check it out.

Image Resizing

Friday, August 24, 2007

LeetBoard Tech: Custom BBC

LeetBoard aims to provide you with the ability to create your own BBC tags to use on your board. Unfortunately, this means the mechanism responsible for creating the buttons users click to add the BBC to their posts requires some advanced programming in order to allow you the freedom to create BBC tags without any restrictions on how much they can do.

BBC tags are traditionally just short-hand codes which are replaced by their HTML counterparts. But some more advanced tags may allow you to use syntax highlighting, or even generate dynamic content. No forum software before LeetBoard has given you this level of power when creating custom BBC tags.

Saturday, August 18, 2007

LeetBoard Tech: Modular Scalability

Something that is in high demand in the computer industry nowadays is modular software. You want to be able to quickly and easily add a new feature to your software without having to drudge through millions of lines of code. Many forum software packages give you the ablility to add your own codes to the mix. But, the problem is many of them get a little carried away with it all. Take MediaWiki or phpBB for example. Sure, they are completely modular, right down to the error message texts. But, they are just TOO modular. It's very easy to get confused or turned backwards in the millions of lines of code you have to go through just to find where to put a new feature.

LeetBoard is not modular to the extent of MediaWiki or phpBB, but is modular enough to allow you to easily find where a new feature needs to be inserted or create a new feature for your board without needing to step through twenty different pages of code. All major features of the board have their own independant file, which is layed out in a manner that is easy to follow. If you want to create an entirely new major feature, just make your own file for it and drop it in the custom module folder, and LeetBoard will automatically use it when it is requested by a user.

LeetBoard Tech: Logging

All forum software big and small is prone to "trashings". Whether it's Invision or phpBB, you are almost guaranteed to have an incident where a moderator account is stolen or a moderator decided to go AWOL and delete a couple or all of your board's posts. No forum software has ever featured the one thing that could save you from such a disaster; that is, until LeetBoard!

LeetBoard boasts a logging feature that records all moderator and administrator actions and automatically generates an undo code, allowing you to restore a board to its former glory with one click. This feature is completely new and can ONLY be found in LeetBoard. Just another reason why you may want to switch your forum software to LeetBoard when it is publicly released.

LeetBoard Tech: Searching

Creating a search engine is very simple. Creating a search engine that has all the features a user would ever want is another story entirely. At present, the LeetBoard search engine only allows a couple of basic searching techniques. It would take forever to make the search engine as advanced as Google, but we would like to continue working on it until we have a respectibly close one.

LeetBoard Tech: "Is Read?" Issue

A feature that is familiar to everyone who uses any sort of forum software is the "Is Read?" or "Is New" feature. This feature is responsible for telling you what posts you have and havent read every time you log into or visit a board. Every forum software has a different way of accomplishing this. LeetBoard uses its own unique style, utilizing a database and cookies.

When you first log into LeetBoard, a blank cookie is set. When you read a topic, the ID of the topic and its newest reply is saved to the cookie. If a topic was made between your previous login time (your last login) and the time you just now logged in, and that topic does not appear in the cookie, the topic is marked as new. Similarly, if a new reply was made between your previous login and your recent login, and the parent topic's ID and the reply's ID dont appear together in the cookie, the topic is marked as new. Logically, this should be a perfect method for checking if a post is read or not, but for some reason it does not work correctly. I am not sure why this is, but I am currently working to figure out what the problem is and fix it.

Edit: The problem was due to a conflict with how posts were decided as being read or unread. Each member has a "last login" time saved with their account. This time is saved each time the user logs in, and its previous value is used to see if posts were made between the previous last login and the current time. The issue has been resolved by adding a query that updates the last login time to the current time when the user logs out. Issues may still occur if the user explicitly deletes the cookie which stores the forum session or lets the session expire without logging out.

LeetBoard Tech: Smiley Issue

An issue has been found concerning the smilies. When rendering the smilies from textual to graphical, some smilies are not correctly rendered. For example, if we have two smilies available, :( and >:(, and we have a post containing the text ">:(", the sad smiley is rendered with a preceding greater-than sign (">").

This is called a collision; when two conditions are similar, and one is checked before the other, the other is not met or is overridden. It is due to the renderer checking the whole text and replacing all occurrences of the sad smiley then checking the whole text and replacing all occurrences of the angry smiley. In order to fix this issue, the renderer must check each character of the text one by one and compare it to all possible smiley conditions. This is rather tedious and will add anywhere from half a second to two seconds, depending on how many smilies your board has, to the renderer's runtime.

Edit: All current smiley-related issues have been fixed. Smiley functionality is now complete.

Friday, August 03, 2007

LeetBoard Status

I didnt get a chance to post about my newest code back when I started work on it, but heres a little catch-up post. Ive created some forum software affectionately called LeetBoard. It is actually a further build on a bit of forum software I designed about a year about for a gaming clan called ThE NuBs, at which time the software was called ThE NuBs Chat.

Now, it is up and running for the Habbo Hotel in-game corporation Myishi Corp and is a prime feature of their site. You can find the Myishi Corp website, also done by me, at LeetBoard is currently in beta stages of development as a private project, and is just now on the verge of entering version 1.2. However, upon completion, it will be made public.

Sunday, May 20, 2007

My Space on MySpace

Well, Matt threatened to make a MySpace for me that would make fun of my mother, or something. So, I decided to make one just to keep him from doing one for me. You can find it at this page.

Dont bother adding me to your group or friend list or whatever, as I wont go on it much. Its really a terrible website. I dont understand what everyone else likes so much about it. Well, at any rate, enjoy!

Sunday, April 22, 2007

Update: Warn Logger

Ok, after roughly 12 hours of the release of Warn Logger v1.3, its now time to release the second edition to it. Introducing Warn Logger v1.3.1!

The only added feature is the long-awaited "New Topic" mode, in which logs are saved as individual topics instead of replies to an existing topic. Along with this mode comes some dynamic tags used to show helpful data to the administrators who review the logs. Check out the installation instructions for more info.

Saturday, April 21, 2007

Update: Warn Logger

Warn Logger v1.3 was released today. It fixes a few compatibility issues with FireFox and actually works a lot smoother with both FF and IE now. One of the major issues fixed was the bug with the onLoad event.

The Frame responsible for loading post data and external links during Warn Logger's execution is required to load a page and let Warn Logger know when the page is done loading and execution can continue. The easy way of doing this is to use the onLoad event. Unfortunately, the onLoad event has some serious issues, especially when trying to dynamically change the function it calls. So, I swapped out the onLoad event with a substitute function that seems to work just as well. Here's the function:

function waitForLoad(nextcall)
// Since there are issues with the onLoad event, this function recurses until the document has no updated content
if (currentdoc == ""){ currentdoc = window.frames['wlframe'].location.toString() }

if (currentdoc == window.frames['wlframe'].location.toString()){ setTimeout("waitForLoad('" + nextcall + "')", 500) }
if (olddoc == window.frames['wlframe'].document.body.innerHTML){ currentdoc = ""; olddoc = "" }
else{ olddoc = window.frames['wlframe'].document.body.innerHTML; setTimeout("waitForLoad('" + nextcall + "')", 100) }
catch(e){ setTimeout("waitForLoad('" + nextcall + "')", 100) }
if (currentdoc == "" && olddoc == ""){ eval(nextcall) }

I call this function and pass the function to run after the page is loaded to it. Then, I change the frame SRC (document.getElementsById('wlframe').src), and ta-da! A custom onLoad event! Feel free to use this code as you please.

Monday, February 12, 2007

A New Support Approach

Howdy! Well, it's time to blow the dust off this blog with another new idea.

Ok, so, I've been getting a lot of support requests lately from people with problems with good ole Warn Logger. Now, I love helping people out and am in no way trying to tell people to back off with this concept, but the same problems keep reoccurring. So, heres what I plan to do.

I'm going to design a new chunk of code to allow the user to troubleshoot the code before they contact me. The troubleshooter will allow the user to fix the problem theirself or tell the person exactly what kinda information I need to get from them in order to fix the problem quickly and efficiently.

Here's a run-down of how I immagine it to work. The code starts by writing a try block on every line. If an error occurs, the try block will know of it and alert the user. The code will also be aware of the common errors encountered and common remedies the user should perform. The code will also check to make sure the code to test is installed properly. If all else fails, the user will be alerted with run-time reports from the code that need to be sent to me in order to fix the problems.

It's a bit low-tech, but I'm thinking up different ways of going about doing this without all the try blocks and such. If you see any codes pop up utilizing this concept, guess who the coder most likely stole it from! :p