Tuesday, December 16, 2008

My best work!

In first, the hardest simple code I have ever programmed, the tide calendar. So why is this in first and not something else? Well, what else would be in first, this is the big project that I did this this year, I stood after school more than four times for this as well as countless hours at home. So how long did this take? Well when I first got this project I went to work right away trying to find the equation that would make a tidal graph. For a week I looked up how to make tidal graphs, I found a few equations, tried working them out with Darren but dropped the idea because of the time restraint and the lack of resources including the supercomputer used to graph each day. So after that was done, I realized that I needed to cut to the chase and just get it done. So I found a website, http://www.almanac.com, where I copied the set of points from each date into a file, where the program will use those and graph using several attempts as I tested my way through. Making a graph is simple, making it curve was the whole point that make this project so hard.  The tidal data I received had a range of mostly 4 points, sometimes 3; in which each point had to curve nicely and accurately to the next. Unless you want to type in 1460+ numbers for 53+ weeks (there is a plus for the runoffs into the next month) into excel, I doubt it would get done. Yet all of the points need to be graphed and labeled and oh the numbers.

So after that program was there, I needed a way to efficiently write all the numbers into those crazy files. So what I did was I MADE ANOTHER PROGRAM!!! YES, I did it, made another program, and this is only HUMANITIES!!! (Darren still is wondering why I am using harder math in humanities than I am doing for his class). So what this does is it:

  • Gets all the data off the Internet and saves it as files on the computer

  • Goes through each file and does the following:

    • Looks though each line in search of “PST” or “PDT” (or time zone)

    • once found, it de-html codes the file so it can be read

    • place markers are set

    • values are determined by place markers

  • Saves all the files and reopens all of them to:

    • open up the previous day and saves the last point in it's structure as the starting of this day

    • opens up the next day and saves the first point as the last point of this day

  • Looks through each file and make sure the data is not too far off from what I would expect

    • makes sure there are:

    • at least 2 points

    • next day's point is set

    • previous day's point is set

    • the timezones are messed up from the next/previous day

That $12 is looking quite generous for this calendar yes? As if that is not enough major revision with debugging were needed to make it look better. The “curve-i-ness” of the tides needed to resemble that of an actual tide which needed to have a lot of revisions. Text needed to be added in able to read the points of the graph, while the lines in the background were removed so that it looked nicer. Only highest and lowest text would appear. And the worst of all, they needed to connect and continue their curvy pattern. So what really killed me is when I was updating my graphing program and I needed to solve three things:

  • connecting graphs

  • fix graph ratio from 4:3 to 4:2

  • fix text to not block text

And the top ones messed me up as I tried to fix my code failure as it just went from worse to worse, and eventually the lines started appearing from the top as well as lines going in circles. The text problem from blocking out the date number was fixed on the first try (it was that easy). I soon after reported into Randy that a Photoshop job with my backup graphs would be a lot better to handle than doing this to who knows when. It took us quite a long time to do it by hand when a graph took 40 min to complete and there were 12 months (8 hours) of making lines in Photoshop. As well as the tidal highest and lows had to be redone because of the size ratio.


And in second, will be my website page in flash. Starting from ver 1.0 and going to 2.0 in a day as my second flash project I made, it looks very nice. And it works too! So if you have seen the website around when I actually posted this message, you would say, “Why no photo essays show anything yet besides empty boxes”. And I would like to assure you that my flash does work, but just separately, and that is because of security issues built into flash programs to help make the computer be more secure. So what do I mean by these “Security measures? I never see any thing pop-up on you-tube about this stuff?”, and the reason is just simply explained how Paul explained it to me when he told me why it wasn't working.

If you invite someone over to your house, you would not like it if they were to invite another person with them.” Well in this case, the website has invited a friend over, my flash site, and my flash site is trying to call another person over (in this case call over pictures and text from the Internet). So really, if they were seen separately, they would be able to run as smoothly as intended. He has said before school ended today that he knows how to fix it, so with 16 other thins I sent him in an email to fix eventually, this is got to be done.Version:1.0 StartHTML:0000000168 EndHTML:0000012873 StartFragment:0000000489 EndFragment:0000012856

In first, the hardest simple code I have ever programmed, the tide calendar. So why is this in first and not something else? Well, what else would be in first, this is the big project that I did this this year, I stood after school more than four times for this as well as countless hours at home. So how long did this take? Well when I first got this project I went to work right away trying to find the equation that would make a tidal graph. For a week I looked up how to make tidal graphs, I found a few equations, tried working them out with Darren but dropped the idea because of the time restraint and the lack of resources including the supercomputer used to graph each day. So after that was done, I realized that I needed to cut to the chase and just get it done. So I found a website, http://www.almanac.com, where I copied the set of points from each date into a file, where the program will use those and graph using several attempts as I tested my way through. Making a graph is simple, making it curve was the whole point that make this project so hard.  The tidal data I received had a range of mostly 4 points, sometimes 3; in which each point had to curve nicely and accurately to the next. Unless you want to type in 1460+ numbers for 53+ weeks (there is a plus for the runoffs into the next month) into excel, I doubt it would get done. Yet all of the points need to be graphed and labeled and oh the numbers.

So after that program was there, I needed a way to efficiently write all the numbers into those crazy files. So what I did was I MADE ANOTHER PROGRAM!!! YES, I did it, made another program, and this is only HUMANITIES!!! (Darren still is wondering why I am using harder math in humanities than I am doing for his class). So what this does is it:

  • Gets all the data off the Internet and saves it as files on the computer

  • Goes through each file and does the following:

    • Looks though each line in search of “PST” or “PDT” (or time zone)

    • once found, it de-html codes the file so it can be read

    • place markers are set

    • values are determined by place markers

  • Saves all the files and reopens all of them to:

    • open up the previous day and saves the last point in it's structure as the starting of this day

    • opens up the next day and saves the first point as the last point of this day

  • Looks through each file and make sure the data is not too far off from what I would expect

    • makes sure there are:

    • at least 2 points

    • next day's point is set

    • previous day's point is set

    • the timezones are messed up from the next/previous day

That $12 is looking quite generous for this calendar yes? As if that is not enough major revision with debugging were needed to make it look better. The “curve-i-ness” of the tides needed to resemble that of an actual tide which needed to have a lot of revisions. Text needed to be added in able to read the points of the graph, while the lines in the background were removed so that it looked nicer. Only highest and lowest text would appear. And the worst of all, they needed to connect and continue their curvy pattern. So what really killed me is when I was updating my graphing program and I needed to solve three things:

  • connecting graphs

  • fix graph ratio from 4:3 to 4:2

  • fix text to not block text

And the top ones messed me up as I tried to fix my code failure as it just went from worse to worse, and eventually the lines started appearing from the top as well as lines going in circles. The text problem from blocking out the date number was fixed on the first try (it was that easy). I soon after reported into Randy that a Photoshop job with my backup graphs would be a lot better to handle than doing this to who knows when. It took us quite a long time to do it by hand when a graph took 40 min to complete and there were 12 months (8 hours) of making lines in Photoshop. As well as the tidal highest and lows had to be redone because of the size ratio.


And in second, will be my website page in flash. Starting from ver 1.0 and going to 2.0 in a day as my second flash project I made, it looks very nice. And it works too! So if you have seen the website around when I actually posted this message, you would say, “Why no photo essays show anything yet besides empty boxes”. And I would like to assure you that my flash does work, but just separately, and that is because of security issues built into flash programs to help make the computer be more secure. So what do I mean by these “Security measures? I never see any thing pop-up on you-tube about this stuff?”, and the reason is just simply explained how Paul explained it to me when he told me why it wasn't working.

If you invite someone over to your house, you would not like it if they were to invite another person with them.” Well in this case, the website has invited a friend over, my flash site, and my flash site is trying to call another person over (in this case call over pictures and text from the Internet). So really, if they were seen separately, they would be able to run as smoothly as intended. He has said before school ended today that he knows how to fix it, so with 16 other thins I sent him in an email to fix eventually, this is got to be done.


Sorry if this seemed like my life story, I just like electronics...........

Tuesday, December 2, 2008

Marie Arana's Washington Post

Her article was very well made as she introduced alot of good points in their, as well as being funny at the same time. But I do not neccisarily like the wording of the underlined of her conclusion:
"In other words, the color of a president-elect's skin doesn't tell you much. It's an unreliable marker, a deceptive form of packaging. Isn't it time we stopped using labels that validate the separation of races? Isn't it time for the language to move on?"
I do not think that our languagge has anything to do with this, just the people using it. People can use language to both sides of this fight, and with that statment sshe is claiming that it is mostly against her. I think it more fit traditional customs better since that is where the statments "one-drop rule" and "Part-black is all black" came from, so why not get rid of that, trying to block out the words only makes them stronger. But with that aside, the statment is very good, explaining that we need to get rid of the root of the problem before it becomes a weed.

If their goals as a race are set low, then their life expectations may reflct that, minorities are usually kicked in the mud so that when they are being made fun of, even in a joking mannor, it may slowly eat away at their expectations in life. Even though the person may know its joking, if they hear it enough, they start to consider it. And which concidering it, loweres goals within itself. Its just not good to do it anyway.

Thursday, November 20, 2008

Turky break!

This year (and probably every year) I am most thankful for computers! Not surprising huh? Well, lets see into more detail. All of my projects are on the computer! For math, I made my binary space game, for humanities I made the tides, and for biology I use excel. So really computers have been keeping my projects going. And they also say that you don't realize how important something is until you lose it, so it would be incredibly bad if the computer went bye bye, since I already know the importance of it.

So for my math project, I wouldn't even be able to do my project if computers weren't there.

Humanities, you thought it was bad to do one graph in 3 minutes? Well what about 15 without the computer (at minimum)? And how would we get the tide information?

Biology, those graphs we made for the analysis would take longer to get done without a computer.


And its also my hobby, so it would be very sad if computers would go away, that would mean:

electronic cameras,

electronic copiers

electronic printers,

cell phones,

MP3 players (iPod),

TV,

street lights,

ATM machines,

sliding glass doors,

Auto-pilot and massive planes,

Wii/ PS3/ Xbox360,

AND MORE!


We will hope to get a lot done over the thanksgiving break. Firstly will be the layout and laying out the tide information for the calendar. Also leaving blank spots for the pictures essays and more. I will try to make it look nice so that when we get everything, putting in everything will be the last thing we will have to do, then getting it critiqued and fixed to the peoples expectations.

H2O programming madness!

I just found out this week that I can save myself time by making a program that will do my homework for me! So what is my project? I am making a tide calendar, and my role in this is to make the graphs from day to day what the tides will be in Point Loma. Sooo, I have made two projects so far, one over the weekend (at least ver 2.3 of it) and one Tuesday to help me with graphing this crazy line.


The first program:

This was intentionally supposed to be just another standard grapher with an object placing dots following the graphing object as it would draw rough jagged lines (so as it would make corners, the “follower” would make a nice easy curve as it follows it). I tried to make an equation to figure out tides, but it just turned out to be too many variables involved than just the moon [the sun, distance, direction, location of the sight, phase of the earths tilt, earths rotation/time, formation of the coast line and more]. So I ended up taking information off a website into a “.ini” file in which the grapher reads this file and spits out the graph.


The second program:

This program was made out of my laziness of manually making 365 “.ini” for tides (making mistakes that can take time to figure out). I calculated that it would take approximately 18 hours with 1 “.ini” file in 3 minutes on average [this is not including coffee breaks of source, and all the morphine breaks that will be needed to go though all this]. So I made this program that makes the “.ini” file in steps

1)downloads every single web page onto the hard drive (because it does take a while, and redoing them would be a pain to re-download)

This possess takes the most time, running for about 15 min

2)makes the main chunk

-opens the web file in html format

-read every line until it finds the keywords “PST” or “PDT” (which happens to only occur on the tide information

-decode the html jargon

-set place markers

-collects text relative to the place makers

-writes them down

-writes the date!

This happens in less than 1/30th of a second

3)makes the beginning and ending of the graph (this is so it runs smoothly together from one to the next)

-opens yesterdays document

-copies the last tide information

-makes it the before spot and changes the PM(1) to (-1)PM for yesterday


-opens tomorrows document

-copies the first tide information

-makes it into the after spot and changes AM(0) to (2)AM for tomorrow

still happens in less than 1/30th of a second

4)runs a final check to make sure no “.ini” files are missing anything and reports suspicious results


Did you have enough of technical stuff? You better be glad you don't know what magical code is going on right now in your computer! This is just a cakewalk to my intense programming skills. But yet it really helps me a lot so I can work on other stuff for the project. So I plan on making the template in InDesign so we can get this project rolling. Well at least the main basic template since the tides are here!!!!

Oh yea, I also improved the TIDE PROGRAM! It had to be improved to go at max of 9999 frames per second computing the tides. At the end of every tide, it would take a screen shot of itself as a “.bmp” file and restart itself computing the next tide until it reached its goal. Computers are great.

Wednesday, November 12, 2008

School clock announcement!

Hey everyone, good news! I have just updated my school clock from Javascript to Flash! Even though it works just the same, it looks a lot better AND it does not cut off on the words if it becomes too long! Right now the background does not look so hot, but Paul’s magical skills will be let off the chain as his major flash skillz will blind you. I hope this is a major improvement as it is one of my tests to get to know to use flash better for my oncoming project for the H2O flash site! I know a lot of people use my clock in class so I hope this is an improvement, and the old clock is still there too. Post comments, good or bad about the clock, I need to know what might make this look better for when I will release my tidal clock!

 

Visit it at: http://students.hthma.hightechhigh.org/~jneighbors/clock.htm

H2O project goals and mission objectives

For the H2O project, I am doing two projects,

1)      tide calendar

2)      website (more specifically automatic daily tidal chart)

So this means that I will have to models; for the first model I am obviously going to do a printed tidal calendar, but for the second model I am doing more of a flash oriented version of it.

 

So for this crazy scheme of mine, it must be laid out very carefully or else I might explode right? So the deadlines were actually laid out in a way where I got it done in a way where it can work out for both projects. How is this? If you seen one of my other blogs Sydney laid out the fabulous deadline chart on when I will get all of our groups work done. My deadlines are all before Turkey break (thanks giving), so I have time to finish up on one, then do the other at the other half or so. It also helps that I do not have to do additional research than I already have for my original tidal chart. The tidal chart is based upon a mathematical function that can be reproduced on both the tide chart and also the flash.

            So for this magical formula of mine that can read tidal waves is Point Loma some how. Sadly enough it is not done, but over this four day weekend I have made extensive research about it, in which I came up with pretty much a page with sources and such. So I asked Darren for help, hopefully he will respond back with more than three words at the time, but it did not help that I sent him this with such short notice (and he wants to use this break just as much as everyone else). So if I get that done and the formula works, I will plug it into a game that I made to make jagged lines curvy if it is not so already. But if that does not work, I have found a site that I can use that has 4 points for every day about the tides in Point Loma. But I would much rather use that as a last resort just incase I cannot do anything about the formula that I tried to find.

            Hey, if you reading this article might know what I am looking for, or know something that I don’t about this magical tide stuff. You can always post a comment or email me (since my tracker bar is off the scale down bellow)!

Ening of a chapter, I think not!

While I was reading the article Randy found for us to read, I agreed on a lot of stuff in the article, but one part in the beginning. This role of Obama being the president does not mark the “the end of another magnificent chapter in America’s experience of democracy.” But instead, he marked the beginning of what could be great in our history. Now this didn’t JUST happen; other events happened along the way paving the way to what we know today with Obama being the presidential elect. We got the abolition of slavery, separate but equal, black rights and then black people in baseball.

            Jackie Robinson, the first black person in national baseball. His role I think is now repeated for the new presidential elect, but in a different standard. When I was watching a biography on Jackie Robinson, the most interesting quote I remember is when he got the job that his coach brought him to his office and told him very plainly “I stuck my neck out for you, don’t let them cut it off.” Since then, he lived up to that line and always tried to keep up to those expectations. Since he represented the whole black community, he needed to make sure he didn’t screw up, not once. I think this expectation is now on the new president elect. Every one is hoping that this new president can pick up all the litter that all the other presidents so blatantly left on the floor. If he does do a great job like what Mr. Robinson did, then we will be writing a new chapter FOR SURE in the history about fixing a big stock market crisis and finishing the war without looking like a fool.

            Hey, when Jackie Robinson started getting people to go into baseball, baseball started getting more money. So let’s home that this will work the same, because nobody wants it the other way. Enidng a chapter is looking a glass half empty, im looking at it half full! Happy thinking is always good, and hopefully we will role in with happy times!