Tuesday, March 26, 2013

Binary Search in Java

I implemented a binary search algorithm in 36 lines with no outside help whatsoever. We learned the linear search and bubble sort algorithms in Java class today, and we described the binary search but didn't actually code it (we will this Thursday). So I decided to skip ahead a bit and try to write it myself. I had to work out a few kinks along the way, but it works! It works very well actually. And I feel that kind of accomplished feeling that I love to feel.

And I've added some new keywords to my OO-scripting language. I'll release it pretty soon!

Monday, March 18, 2013

Designing an Application Launcher

I try to employ minimalism in most of the applications I've been developing recently. I'm using Windows 8, and I'm not upset at all that we don't really have a "Start Menu" like the olden days of Windows, but I would really love to have a sort of "Application Folder" to access all of my favorite applications. So I've spent the past few hours writing this "AppLauncher" thing, and it's very low-tech at the moment, but it works the way it should.

After I get this going I'm going to write something similar to the original "Start Menu" except using Blend and WPF (I've never touched Blend before, so that will be exciting!).

I'm waiting on my friend Braden to design a cool icon for this "AppLauncher" project. I'm sure you could tell from my PageNotes icon that I'm not the greatest artist in town. :P

I expect to release this within the next day or so, and then I'll begin the WPF "Start Menu."

I really hope Winforms doesn't die out, but I also love learning new technologies. Time to sleep. I have to go to work in nine hours and fifteen minutes, and I'd like to be mentally prepared for whatever is in store for me at Burlington Coat Factory... please save me from retail...

Sunday, March 17, 2013


I'm glad people are finding PageNotes to be useful. I've added a few new features that should make life easier and extend the usability of the software itself.

Open webpages directly from PageNotes by selecting a page note, right-clicking the list, and selecting the "Open" option in the context menu. This works for multiple pages as well. So if you select all page notes (by pressing CTRL+A), right-click the PageNotes list, and select the "Open" option, all of the pages will be opened in your default web browser. If you use a modern browser, your selected pages will be opened in new tabs. You can also select specific items by holding CTRL and clicking the items you want to open, remove, or copy.

Copy pages or notes (or both) to the clipboard by right-clicking the PageNotes list and selecting the "Copy->Selected Pages" (or Selected Notes, or Selected Pages+Notes). So if you'd like to copy a list of your pages to send in an email you can do just that.

If you want to reload PageNotes (to see your currently saved page notes), you can reload without restarting the application by pressing CTRL+F5. This will just read the database (if it exists) and populate your PageNotes list.

Also, if you'd like to know why you can't find the PageNotes flat-file database (assuming you haven't checked the source code), you can just look in the PageNotes.html file that the application generates. I create a comment space at the beginning of the file to contain the data. So the PageNotes.html file is a flat-file database in itself.

PageNotes (v1.0.0.4)

Please view the README for more information about how to use PageNotes.

Monday, March 11, 2013


When I'm surfing around the web and I find all sorts of interesting pages and articles to read, I just want to bookmark all of them and get back to them later. But if I did that (at my rate), my web browser would be way too cluttered with unnecessary bookmarks and whatnot. I came up with a solution to this problem by creating my own webpage bookmarking system. It's a bit low-tech, so it's a standalone application but it generates a pretty neat (and "minimalistic") webpage for accessing all of my soon to be read bookmarked webpages. I call it "PageNotes" because each entry has a "note" attached which gives each bookmark a meaningful description of what the webpage contains. The note can be incredibly long if you wish, or as brief a single char. With that said, I'll give a couple of screenshots to demonstrate.

This is after adding three entries.

To save, press CTRL+S. To open the PageNotes.html, press CTRL+O.

Here are the files!
Binary @ Softpedia

For more information on how to use it, check the README at the project page.

Wednesday, March 6, 2013

Code Generator (Java)

So I'm taking a Java class at my local community college and I realized how tedious it is to code out accessors and mutators for each class level variable in our assignments. I noticed the frequency of my copypastas and decided enough was enough! So I wrote a small application to handle this for me. Basically, it's a window with two TextBoxes (i/o) and one Button (to generate code). It takes a list of "simple declarations" and with a little bit of string manipulation creates a public accessor and a public mutator for each specific variable in the list. The datatypes aren't hard-coded, so it just uses what you give it.

When the application runs, I give a synopsis on how to use it (in the "Input" TextBox).

So we paste our list of class level variable declarations.

After the text is pasted into the "Input" textbox, we can click the "Generate" button.

Click the "Output" TextBox once to copy the accessors and mutators to the Clipboard (to use in your source).

In the future I could parse the lines for multiple variable declarations on a single line, or strip the assignment operators and everything beyond them. Until then, this will work. :]

To download the source files, click here.
To download the binary, click here.