Mat's Blog

Random Thumbnail
Random Image

Posts that have the tag "Java"

Java

I'm about half way through Beginning Java Objects, by Jacquie Barker. This is a few months after finishing Murach's Java SE 6. The first portion of the book dealt with syntax and I feel as though I had a pretty decent grasp of the syntax already, so I was able to go through that portion of the book quickly and easily. The second section was about object modeling for a project. This portion of the book I glossed over and didn't really bother reading very in-depth. However, I started to realize the importance of modeling objects.

I've been struggling with direction in modeling objects for legal software I want to design as well as modeling objects for my blog, which I want to fully revamp into OO design. Thus, I think it would be very beneficial for me to re-read this whole modeling section before continuing on to the third section of the book.

However, before I even go back and read that, I decided to put Object modeling on the back burner for a little bit so that I could start a new book: TCP/IP sockets in Java by Kenneth Calvert. Before I can fully realize how the objects in my legal software can work, I want to become knowledgeable of Network programming so that I know which objects should do what and be more qualified to program the legal software.

As for my PHP objects, I'm finding it difficult to separate the procedural issues from abstract issues. That is to say, I want to try to abstract what my blog does, but I find the procedure creeping into my abstract description. Nonetheless, I'll try writing it out further in the hopes that I can feel my way through this.

Posted on December 21, 2009 at 10:07 am. 0 comments. Tags: Java admin php development dev



Website Overhaul

I've been in the process of overhauling the code of my website. I'm cleaning up a LOT of my code to make it more readable and condensed. I'm also trying to remove redundant code through the use of functions.

I've also removed MANY bugs that I found after reviewing my code, especially a few that concern data sanitization.

Finally, I'm rethinking my Image Gallery program and scripts. Namely, I'm removing some of the superfluous code I'm using that "pretifies" the data. For instance, I play with the manufacturer and model names to make them look better. However, I'm going to leave them raw. I've changed the look of the image galleries to reflect this change to raw data. I'm also going to include titles. A field will be available for a user to input a title of their photo. If the user doesn't fill in the title, the original image file name will be used as the title.

Posted on November 30, 2009 at 08:03 am. 0 comments. Tags: admin exif image program php javascript



Current Events

A few things have been going on in recent days. First, and foremost, I've run into quite a few problems with my image upload scripts. Initially, I found that images that had a space in the file name would fail. So, I had to add quotation marks wrapped around the file name. Though, of course, I made a dopey mistake and ended up putting the quotations around the command and the file name (oops). Needless to say, the batch files wouldn't work. Lucky for me, I spotted the problem and rectified it relatively easily.

Though, I had a couple images added to my gallery that had no actual image, but all the information. So, I had to construct an image editing page, much like my folder editing page. It's in an incomplete state right now, but I have the ability to delete images now.

As far as the upload program is concerned, I've gotten a lot of the kinks ironed out, but I need to start integrating it into the actual gallery as a whole, including styles and links to the upload page. I also want to be able to handle multiple image uploads. Right now, I have the ability to upload two images, but I only process one image. I'll need to add fields for all the images that will be uploaded and maybe I'll take a look at some of the Javascript accordion-style methods to hide data.

I've also been learning about Java io. I've written a batch program that will avs script files. When I encode video, I use avs script files to frame serve all the episodes of a TV series. When you have 20-some episodes, it can be tedious to make an avs script for them all. Because they're all the same, I can create the files in a batch. I used to have a php script that did it for me, but it was cumbersome to use, at best. Now, I have a Javascript program that I use to create avs scripts for me from a single template. Later on, I'll create a program that creates mkvmerge job files from a single template.

Posted on September 01, 2009 at 10:36 am. 0 comments. Tags: dev admin site image gallery gallery java javascript



Java

I recently got into the GUI portion of learning Java with swing. Now that I'm able to program items with tangible results and computation that I can't achieve via PHP, I've started using Netbeans to program Java programs to test out functionality and figure out structure. My knowledge of the structure of a Java program was somewhat tenuous and by playing around with it now, I'm able to figure out which portions of code where.

In the near future, I look to learn Java IO and maybe Java NIO. Hopefully soon thereafter, I can learn network programming with Java.

Posted on August 16, 2009 at 12:19 pm. 0 comments. Tags: Java programming network programming



Cat Shelter Software

I've been volunteering at a local cat shelter near where I live. Mostly I've been helping at events at a farmer's market where I stand around at a table, talk with patrons and encourage people to take a look at a cat or donate and just talk to them about their pets.

I also used to help with data entry. Though, I've become increasing frustrated with the software used. So much so, that I want to develop an online database for all of the data. I already have experience in developing front end, web-based data pages. The biggest hurdle, right now, is database construction. The medical information is so varied, that producing a single table or a set of tables is difficult. So, I have to extract the information from the shelter manager/owner...but, that's difficult because she's so busy. So, before I talk with her, I just have to do what I can for now and move on afterward when I can talk to her.

Though, I've also been thinking about developing law administration software. Having worked in the legal field for several years, I think I have the knowledge to start writing my own, custom software to keep track of what I do now. Initially, it'll have to be web-based, but I hope to eventually learn network programming, allowing me to communicate within a network and maybe even remotely. Though, before I even start, I'll need to have a look around and see what else is out there and how they work.

Posted on August 10, 2009 at 11:11 am. 0 comments. Tags: software cat shelter law software database php java



Site Updates

Holy Crap, the code for my site was far worse than I expected. I'm currently reviewing the entirety of my website's pages. There are quite a few deficiencies in the logic in some of my pages. Moreover, remnants of debugging exist. Finally, I was far too concerned about removing any bit of javascript from my page that I made some rather roundabout coding when Javascript redirects would have been better. I'm also going through the code attempting to comment the code so that it's more readable.

I'm also pulling apart the code attempting to separate and abstract some of the functionality, such as page redirects, which may be better off as a function.

Moreover, I also learned more about cookies. Turns out that when you initialize a cookie, you cannot use that cookie on the same page. My new code would authorize if it could read all cookies that I set for authorization and de-authorize if it could not read them. This would merely be a variable that would enable certain features on the page for authorized users. So, my page would tell me that I wasn't correctly logged on, but going to any new page would show that I was, in fact, logged on. What I found out was that my old setup would authorize if the cookies were correct but would NOT de-authorize if the cookies were incorrect. This, to me, was rather sloppy. So, I changed this aspect, but it's going to necessitate an extra step in logging in so that the login pages reads correctly.

In the end, this will take a few days to be put up.

Posted on June 01, 2009 at 10:17 am. 0 comments. Tags: dev php javascript website admin



Java Books

I couldn't read the Sam's Teach Yourself Java 9 in 21 Days book any longer. The book was just not teaching me very much. While reading, I felt that I was learning more because I had learned other programming languages before this book than because the book actually imparted any information.

The book was touted as a beginner's book, but it came off as more of a review. Thus the actual information provided was very shallow and described in very poor detail. I had read about half the book and still felt that I was unable to construct a program on my own. A lot of other information was missing or required me to infer from examples. For instance, the main function in a Java example seemed recursive when it would call the class of which it is a part. It took me a while to realize that the main function was special. Moreover, most of the main functions had a lot of language attached to them, such as "void", "static", etc. None of those were explained in any depth.

I think what was most annoying about the book was that a lot of information was mentioned or discussed, but was completely out of place. For instance, early on, an entire chapter was devoted to handling errors and exceptions, which seemed out of place considering that at that point, I had barely learned much actual programming, let alone enough to produce many major errors that were anything more than syntactical. Moreover, the chapter didn't even do that great of a job explaining what catching an error would do. There was a lot of other information that was described as important, but the book said that it would be explained later on. So, you're being told about something that wouldn't be explained in any depth whatsoever. In fact, there was a lot of information that was described as important without any explanation as to why it was so important.

In the end, the book was frustrating. I got a minimal amount of information out of it and I just moved on to another book. In this case, I went to Murrach's Java SE 6.

Posted on May 19, 2009 at 10:29 am. 0 comments. Tags: java book programming computer



Computer Books

I've bought the following books:

Murach's Java SE 6, by Joel Murach and Andrea Steelman
C++ Primer Plus, by Stephen Prata
Beginning Java Objects, by Jacquie Barker

My plan is to finish Sam's Learn Java 6 in 21 days (or most of it) and move on to Murach's Java SE 6. After that, I'll read the Beginning Java Objects book as OOP appears to be a very important concept that I'm required to learn if I want to go at all far in programming.

From there, I will probably start reading about Java ME. Once I've developed a few applications for my Blackberry, I think I'll continue on to learn C++.

Though, I'd also like to pick up a book on 3D rendering and read through that as well. Maybe I'll learn to program games (yea, right).

Posted on May 11, 2009 at 05:05 pm. 0 comments. Tags: Java C++ Java ME books programming



Java

I'm about half way through my Java book (Sam's Learn Java in 21 Days). At this point in time, I feel as though I have a basic grasp of the syntax, combined with a basic grasp on how to get something done inferred through the code snippets. However, I'm still woefully hazy on how the language works to the point where I could write something without egregious reference to books. Unlike PHP where I can write most without only mild reference to the book.

Whatever the case, I'm still going to finish most of the book. Near the end, I may put the book down to engage other books on the subject. I have another Java book waiting for me at home to read when I'm done with this book.

I anticipate that Java will be great for me in developing server-side programs as well as developing programs for small devices and embedded devices. However, I'm sure I'll have to pick up C++ in the near future to develop programs for the desktop as well.

I may also pick up some books on 3D modeling eventually, too. Though, I need to get a little more into drawing as well.

For my website, I solved the problems I was having with subdomains. I was unaware that I was required to have my domain registrar forward my subdomains to locations. Thankfully, they give me the option to forward all subdomains with a wildcard asterisk. As such, I've set up http://m.kakomu.com as the subdomain for the mobile version of this website. However, I need to revamp the security protocols of this website to make it compatible with Blackberry's arcane javascript handling. After I'm finished with that, I can create a minimalist website for mobile devices.

Posted on May 11, 2009 at 04:55 am. 0 comments. Tags: Java C++ subdomains website apache 3D books security



Update

I recently wrote a script for my server that uploads a file. At its base is a HTML form that allows a user to choose a file and upload the file. From there, PHP will catch the file, move the file to a temporary upload directory and output information on the file. That, in and of itself, is neither difficult nor complex. In fact, it took only about 20 minutes to get an idea of what I need to do, edit the php.ini file to allow for larger file uploads and so forth.

The problem, however, is how browsers treat file uploads. When you upload a file using plain HTML, the browser will sit there uploading with a blank screen. Once the file is uploaded, then the next page loads and renders. To me, that's intolerable. If there's a problem with the upload, or it's going oppressively slow, you won't be able to figure out why. Thus, feedback was necessary for an upload script to function well enough.

Initially, I was looking at writing a CGI/PERL script or learning enough java to write a scriplet to facilitate the upload bar. But, the amount of time needed to figure that out was way too long. Though, I found out that PHP did have some function called APC that caches data and allows me to retrieve it. IBM wrote an article on APC usage that helped me out. I found that a lot of people had trouble getting apc_fetch to work and that it would return "false" when uploading data. I found that you needed to add "apc.rfc1867 = on" to your php.ini file. Afterward, it functioned correctly.

The page itself is a form with two buttons and a text bar. One button to browse for a file and one to submit. I have two Iframes on this page, which both start blank. The left Iframe is where the uploaded data is sent. So that frame will sit there loading. When the file is uploaded, the data on the file is displayed. The right Iframe is where the progress is shown. A Javascript function was written to wait 1 second (to make sure the cache had enough time to be reset) and then load the progress bar. The script reads the cache file and retrieves the amount of data sent and amount received and produces a percentage. The bar itself is a div box that's 100 pixels wide and 20 pixels tall that's white with a 1 pixel black border. A second div box is inside with a width that's the same as the percentage complete. So it extends as time goes on. Another javascript function is written to reload the progress page every half second until progress is equal to 100.

What this means, to me, is that I'll be able to write my pages and scripts for uploading, converting, storing and showing my photos for my website.

Posted on May 01, 2009 at 05:13 am. 0 comments. Tags: Images Server PHP Javascript website



Moved the Server

I've since moved my web server from my hacked Xbox to a virtual server running on another computer of mine. The aforementioned hardware instability I had with the Xbox became too much to handle as I couldn't restart the device reliably. As such, I chose to utilize a more controlled environment, hence, a clean installation on a virtual i686 environment, care of VirtualBox. Xbox, on the other hand, has been shoved off to file server duty. It will now function as a file server and backup server.

In the meantime, I'm about 200 pages into my Java Book. Another 400-500 to go. The book is divided into days. I'm currently on day 7 out of 21. Afterward, I will probably move on to another Java basics book. Reason being that I want to get all I can from one person and then get all I can from another person. It's like going to any school. You'll have one teacher teach you math and then another teach you another math. Both will give you different perspectives on how things function. After I'm finished with a second book, it's on to learning Java ME and from there actually designing applications. I have another book on designing games in Java ME, but I'm unsure if I will actually design them or if I'll just take it all in for edification. read more...

Posted on April 28, 2009 at 09:18 am. 0 comments. Tags: Java blackberry programming server



Java

I've decided that I'll buy myself a blackberry phone in the near future. My contract is up in September, I think, but I'm able to get a new phone in May. Meanwhile, I keep hearing this, that and the other about the new Blackberry 9630 Niagara. Unfortunately, there's absolutely nothing official written thus far, so there's no release dates, prices, street dates, nada. So, I'm sitting here in limbo.

However, that's fine. The purpose of a purchase of a blackberry is less to be in and with it and more to be able to do work when I'm not at a computer. The one thing I'm most excited about with a blackberry phone, though, would be to learn Java and object oriented programming. In fact, I don't really need the phone because Research in Motion (RIM) offers Blackberry emulators for developers that allow me to use the phone and program for it, including using an internet connection. I'm currently using Sam's Learn Java in 21 days book and I'll post results later on when I start writing programs.

Posted on April 14, 2009 at 08:14 am. 0 comments. Tags: Java Dev Blackberry 9630 niagara book



Copyright 2009-2010 Kakomu + Mat T