I just created a new website for Worksheets site. I am in the process of moving all the worksheet’s I created for another site over there but I have to regenerate every worksheet with a new copyright. So far I have just have some Math Worksheets posted but will soon have the rest posted. It’s a very similar design to my others because I obviously am not very creative but it’s simple and functional…not to mention fast.
Security Now!
My dad wanted me to put a website up so that he could use it to showcase some of his work to potential employers/customers. As I’ve mentioned many times before, I am not a designer so I once again tried to keep things really simple and it seemed to work pretty well. He really wanted a way to show off pictures of his work and provide a short description/caption for each picture. I didn’t want to make the photo section myself, so I used Zen Photo and made a template using the same design and so you can’t even tell the photo gallery is another application. It was fun even though I still have to make some finishing touches. You can see it at IvanWingo.com.
Purpose
The purpose of Unit 01 is to discuss the history and purpose of the Java Language. We discussed in detail the concept behind the Java VM with it’s pros and cons.
Concepts
- Compilation ─ in the Java language the code does not get compiled into the Operating Systems native language but rather it gets compiled into Byte Code.
- Byte Code ─ is code that can be run on the Java VM.
- Java VM ─ is short for Java Virtual Machine and acts as a virtual machine on which the Java byte code can run.
- Object Oriented Programming ─ is a programming paradigm based on the idea of creating objects. These objects contain all the code necessary to use them just like real world objects contain all the built in functionality needed to use them. This does not mean all possible features are available, but all the functionality available is designed to work on/with that specific object.
- Class ─ is the blueprint that defines the data and functionality that can operate on that data.
- Object ─ is an instance of a class. The class defines the object and one the object is create it contains everything define in it’s class.
Implication
The Java Language was created by Sun Microsystems in 1995 and promised “Write Once, Run Anywhere”. The idea was to create a Java Virtual Machine for each of the many different operating systems from appliances to servers. Java code would then be compiled into Byte Code that could then in turn run on any of the Java VM. This made code portable across many different platforms because developers would only need to write a single application and compile it once and it could then be run on any machine that had a Java VM.
The language was developed almost exclusively as an Object Oriented Programming Language. The purpose behind this type of programming is to model the real world in which objects contain all the necessary built-in functionality to use them. We define an Object by using what is called a Class which is essentially a blueprint for the object. The Class defines all the necessary data and function/methods to operate on that data. It’s not actually an Object until we actually create an instance of it which would be like actually building an automobile at a factory. It remains a concept on paper until it’s actually built and then it becomes an automobile. Objects are define in a class and remain nothing more than a concept until actually created.
Although I have a decent grasp on PHP I am began learning a little Perl and Javascript. They are very similar to PHP with very little difference overall so it’s really just a matter of learning a different syntax. My favorite language ever so far has been the C language. I haven’t even looked at C++ but I probably will after this next school quarter where I plan on taking the Java Intro to OOP class.
The more I’m around the web development side I have definately learned that I don’t like the design much at all. I love the programming and security but not so much network either. Having a programming job with a focus on security is what I really want so Lord willing I’ll have enough money to pick up more than one or two classes each quarter because at this point it’s gonna take me 8-10 years to get my degree, which I don’t mind if I can get a decent job in the meantime. I hate choices…
It’s time to go back to school again and I’m excited because I finally feel like I have a solid grasp on all the major programming concepts except Object Oriented Programming and that’s what I’ll be learning this quarter. I’m taking an Introduction to Object Oriented Programming with Java. I am only taking one class this quarter simply because I can’t afford to take more, but hopefully all my bills will be paid by next semester. My debt isn’t really that much, but working only part time only 180 days a year only to have it spread out over a 12 month period doesn’t leave me with a huge check. So in my case it’s just a matter of how long, not if they will get paid. Having said that, it’s going to be a great semester quarter or whatever it is they go by.
I’ve become obsessive compulsive about my website optimization but it’s one habit I don’t feel so bad about. You’ll notice this site loads fairly quickly and yet there is still a lot I didn’t do. But let me start by explaining what I did to increase the speed.
Reduce HTTP Requests
Every HTTP request your browser makes for an image, css, javascrip or other files it takes time. By reducing the number of HTTP requests you can make a huge difference on load times. Using thing like CSS sprites and reducing the amount of images you use can dramatically improve speed.
Validate
This shouldn’t have to be said but too many sites have error which cause the page to render incorrectly or they use meaningless markup which just adds weight to the page which causes longer download times. Occasionally the site doesn’t validate because something I have in one post conflicts with another post but the code in the template and each individual post contains only valid HTML or XHTML. When I have extra time I go back and try to fix the errors that do appear.
Missing Favicon
I know this is minor (did I mention I’ve become obsessive compulsive?) but I was getting a lot of 404 error because I didn’t have a favicon but browsers were looking for it anyways. Just download this blank favicon HERE and put it in the root of your site.
Gzip
This is where we start to see some real work being done. Servers have the ability to compress certain types of content before it send it to the browser and the browser then uncompresses it before render the page. This all happens in milliseconds and makes a dramatic change in the sites performance. This is what I’m using in my .htaccess file.
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \
\.(?:exe|t?gz|zip|bz2|sit|rar)$ \
no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
ExpiresDefault A2592000
Header append Cache-Control “public”
Header unset Last-Modified
Header unset ETag
FileETag None
Header set Expires “Sat, 4 Jul 2009 20:00:00 GMT
Remove White Space From Javascript and CSS files
Did I mention I’ve become obsessive compulsive about this? There are some PHP scripts that will remove the white space from javascript files for you. The one I used is JSMin.
Avoid Javascript
I don’t use javascript except for Google Analytics or the bookmarking toolbar on each post. By removing some common javascript frameworks that many sites use, I was able to decrease load times on the client side by .6-1.2 seconds.
Use Multiple Domains
Browsers are capable of downloading a certain number of items from a single host at any given point in time. Browsers will see domain.com and sub.domain.com as two different hosts and will download more components at one time. But don’t use too many hosts at one time or it won’t make any difference because you’ll be adding more time for each DNS lookup.
I’m excited, my ISP just increased my upload speed. It’s long overdue and I am absolutely loving it. Wave Broadband was average or slightly above average compared with other offerings in our area for their price, but compared with what the customers need, they were very short. Internet service providers have been very slow in keeping up with customer demands because of their desire to micro-manage their networks. Download speeds continued to increase while upload speeds increase very little even though more and more people are uploading large amounts of pictures and videos to sites like flickr, youtube and myspace. Wave has been very stable, above average customer service and now excellent Download and Upload speeds.
If you’re in the Puget Sound area where wave seems to have the majority of their customers, you should seriously consider going with Wave Broadband instead of services like Qwest or Verizon.
Introduction
My brother, sister and myself were all home schooled and now that my nephew is almost 6 my sister is also considering homeschooling him. I thought I would see what kind of information is on the internet and behold I found tons of stuff on cluttered sites with tons of outdated links.
The Solution
Seeing so much information but hard to actually reach because they are buried amidst tons of Google Ad’s I decided to put together a directory of some sorts that is uncluttered. Of course I want to make some money for my time and to do that you need to attract visitors. The solution is I created a site, registered the long descriptive domain name and began posting information as I found it. The style is simple, provide an excerpt of the actual article with a link directly to the article. I thought about taking time to design something but being lazy and uncreative I settled on a default template of a great CMS called sNews.
The problem & What I’ve done
So, the problem is search engines like Google are very good at recognizing original content from copied content and because 99.9% of all my content is simply excepts I was not ranking high and therefore not getting visitors. So I needed to create some original content, and I did that, and in the end it was a lot of fun. Because I’ve been studying Algebra and Calculus, math was on my mind and then you mix that with my recent attempts to become more proficient in PHP, the solution I came up with was to create Math Worksheets and use PHP to generate the actual problems and answers.
The beauty of using programming to generate this stuff is the power to do a lot of work with little effort. Loops allow us to do something over and over until a given condition is false and so this made it easy to make 1 worksheet and 1 answer sheet and then repeat it over and over to get a large set of problems. I created about 30 different types of math worksheets like, addition, subtraction, multiplication, addition of fractions, etc.. For each type of problem I created 50 worksheets/answer key’s so that works out to about 30,000 problems total with little to no effort. The fun was in figuring out the logic to actually solve the problem and display the results.
If you want to see the site or the Math Handouts I created just visit the insanely long descriptive site called freehomeschoolresources.info and yes I know it’s long but it works well because of the key words and the .info was used because I was cheap and Godaddy was having a sale on them for $1.99.
It was December 1999 when I received my Technician Class Ham Radio license. It wasn’t until July of 2004 that I bought my first radio, a Kenwood TH-G71A hand held. I still remember when I was about 10 years old and my mom told me I should get a ham radio license even though she didn’t even know exactly what it was; She only knew it was like the Citizens Band radios. She suggested this because being quite a geek I was interested in two major things between the age of 5 and 10 — weather and radio communications. Watchings severe weather events and listening to radio communications of all kinds is still my favorite thing to do.
So why the post title? Well, I realized that my license will expire in just 2 years and although it’s as simple as filling out a form online to renew it for a 10 year period, I just thought this would be a great time to upgrade. I’ll be going for the General Class license and hopefully I can talk some friends into getting their license so I’ll actually have some interesting things to talk about on the radio. My nephew is almost 6 years old and I’m hoping that sometime in the near future I can begin teaching him about ham radio. So…I’ll probably write some geeky and technical stuff here over the next year as I study.
In my last post title “Crimson Editor With PHP”, I wrote about how to setup the Crimson Editor so that it will parse PHP and display the results to the output window. In this post I’m going to show how to setup Scite to parse PHP and display the results in the output window.
I’m sorry to disappoint you but this one will also be quite easy. Begin by opening Scite and under the options menu select Open html.properties Scroll all the way to the bottom of the file and look for:
if PLAT_WIN command.go.$(file.patterns.web)=”file://$(FilePath)” command.go.subsystem.$(file.patterns.web)=2 command.go.$(file.patterns.php)=c:\wamp\php\php.exe -q $(FileNameExt) command.build.$(file.patterns.php)=c:\wamp\php\php.exe -l $(FileNameExt)
If you look at the code above you will see the path to the PHP interpreter which happens to be already changed in this code. The only difference between the code above and the default code is the path to the php interpreter. So simply look for the code above, change the bold text to the path of the php.exe interpreter on your local computers and save the file.
Note: I was running into problems with the code that follows the above code and a simply solution was to comment it out as follows:
if PLAT_GTK #command.go.$(file.patterns.web)=netscape “file://$(FilePath)” #command.go.$(file.patterns.php)=php -f “$(FileNameExt)” #command.compile.$(file.patterns.php)=php -l “$(FileNameExt)”
