Saturday, November 21, 2009

0.2 Release

Unlike my 0.1 which was very late, I’m going to go against my way of being, which is submitting things only when I think they are 100% working or good enough to show. I found out today that Edward Sin submitted a function called HashMap (I didn’t even know he was in the class still.).

That so happens to be the same function I posted about on Nov. 12, 2009 on my blog. It’s great that he’s done, I was just ticked off I wasted time on it (I’ll get over it). On a go forward basis, we should check peoples blogs to see what functions they are going to work on for their next release or come up with another structure to avoid this if blogging/lighthouse isn’t enough.

The functions I will take credit for on my 0.2 release are:

0.2 Deliverables

reverse()

saveStrings()

loadStrings()  -Still need to get it working with URL and local storage address, Null is what 
                      it keeps finding. (should find hack by sunday.)

deleteStrings() – Can’t be 100% sure it works until loadStrings works 100% to confirm the deleted address.

Functions I could not get done because they are 3D related              (pushed to 0.3), or I needed more time are:

saveBytes() –Setting Sunday as goal

loadBytes() –Setting Sunday as goal

deleteBytes() –Setting Sunday as goal

For 0.3

modelX()

screen()

screenX()

mouseX() / mouseY()

Other:

By Sunday I also plan to have all the corrections F1lt3r gave me on reviewing my functions for 0.1

They will also be pushed on git back for final review to officially put into processing.js.

Friday, November 20, 2009

Back to processing ^^

I spoke with Andor and he showed me why it's in my best interest to save doing 3d functions for 0.3.
After going over the Mozilla Wiki Tasklist, I started freaking out

"OMG all the easy functions to work on are gone... Noooo!!" *mashing face on keyboard*

Then I got a bit positive and seen functions like:
saveBytes()
saveStrings()
loadBytes()
loadStrings()

None of the above functions were implemented into processing except loadStrings().
I looked in processing.js and found that loadStrings() was somewhat started because it accepted a URL, but it didn't have the JUICY part which is loading strings from a file.
       As most of you processing peeps know, you can't read/write to a file with JavaScript alone. So me being the brilliant computer science student I am, I started scheming,  trying to find a diabolically clever way to get around this (I don't know why my brain has to go against the grain. It screws me over in a lot of things.)

*I'm guessing this is about the point visitors lose interest  //posting picture*

*so are you refocused ;)  *

I started looking into PHP. I figured I can make javascript redirect to a .php page using the post method. Then in that post request I can stuff in a whole whack of data that I can then make .php store to a file.
To get the info back, I would repeat the process having the .php file send me the strings back using post.

I was so happy, I thought I had all the angles covered so I went to go speak to Dave  <- click it once

(thats when Chris Tyler helped me connect to the Mac. Thanks so much.)

I told em my idea all excited, thinking he would be like *wow... ya thats amazing, can't wait to see it.*
2.7 seconds later, Dave says "No no no, forget the php."






(he's not actually that mean)
Instead look into something called localStorage that is new in html5. Dave also directed me to another link and with that, I was off like a kid with A.D.D. in a Toy's-R-Us.
After randomly skimming pages with superfluous explanations, or so many dead ends, I stumbled on this amazing page.

*keep you engaged  Picture 2*















Now I started working on the saveStrings() and loadStrings() and I know I'm going to have to add a deleteString()
// to remove all/any of the items  accumulated into localStorage.removeItem('what ever');


I hope F1Lt3r doesn't hate the idea of using localStorage :(

ZOMG finally connected to a Mac from Windows 7 using VNC.


I know this is out of left field for everyone except me, but I like doing little side endeavors to spice things up. For a lot of people this probably seems like a no brainer, and if it is, then you can stop reading because this is just me patting myself on the back.


To the rest of you who think it would be pretty cool to connect to a Mac computer using windows, the following is a small guide for other Seneca students who have access to this same hardware as I do. (Although the concept is what matters.)

You will need the following:

-Putty (ssh clicent)

-VNC viewer   (<- I used realVNC on a windows 32bit system)  other OS’s use their download page.

-a Mac computer you have access to with a vnc server installed.

Steps:

-Open putty.

-Under Session(on left) find HostName and enter the server you want. In my case it was the canada server. 142.204.133.7




-Under +SSH (in left panel) open the menu and click tunnels

-In destination enter 127.0.0.1:5900

-In Source port enter 5900

-click Add





-Click Open             *you will have a black login screen.*





-If you logged in successfully   then that means you have started your tunneling into the remote computer over port 5900.   *pretty cool eh?*

-Just leave this window open until you are done with the remote computer.

Now to connect so you can see the desktop:


-Open realVNC      




-Under VNC Server enter the following: localhost:5900

-Click Connect

-enter your account password for the account you have on the remote machine.

-BAM!!! you should see a new window open :)  VUALA!  *Halo3 music starts playing*


-Note When you log into the mac from the screen above, you may be disconnected because while logging in, the monitors resolution changed. To fix this, just reconnect and you will be on the Macs desktop.

Tuesday, November 17, 2009

Starting 0.2 with reverse()

So far this reverse function is as easy as it sounds. Take an array and flip it around so that the first element becomes the last and vice versa. For the most part it’s done, but I get bothered by little things. For example on the processing page, reverse displays the array but with no comma (,) separator EX:

String sa[] = { "OH ", "NY ", "MA ", "CA "};
sa = reverse(sa);
print(sa);  // Prints "CA MA NY OH "

In my java script output it looks similar but with “,” that keep being put in  Ex:







The output should be: BMWVolvoSaab   :(

So far I’m trying to use a regExp to search for “,”  and replace with “” but I’m getting an error.

This post is also just to get into the habbit of blogging because I havn’t been doing it enough in this course and I don’t usually think this kind of stuff is a blog worthy post.

Friday, November 13, 2009

Corrections on 0.1

nfp() is now working exactly as the java version works. Check it out.


Link to my text file showing source code has been fixed. I want to make a patch like Andor has but for now F1lt3r check it out.

Thursday, November 12, 2009

0.2 Release functions

- reverse()

- Hash Map

- screen

- screenX()

- mouseX & mouseY  are under the bug section of the wiki task list so I want to talk to teacher before I commit to doing this one.

- modelX()  I want to discuss with teacher before I commit to doing this one.

 

I also need to correct to correct nfp() when 3 parameters are used.

Wednesday, November 11, 2009

Very late 0.1 Release

 

0.1 Deliverables

  • I wrote this blog
  • I updated my wiki page 
  • I created a patch
  • I wrote basic tests for Concat(), Hex(), Join(), Unbinary()
  • nfp() still not wroking exactly how I want when 3 parameters are used.
  • Andor contributed to my project  by showing me a more efficient way to do tests for my 0.2 release. He also indirectly helped because I learned a lot from his demo and implemented one of his effects in my join description page.

For 0.2

I have not signed up yet for the functions I will work on. I want to set the bar to have 1 method ranked easy and 4 ranked medium. I take the ranking from the mozilla wiki tasklist because in 0.1 I used that as my reference for picking all easy methods.

I should have another post tomorrow will my final decision on what functions I have chosen from that list.

I feel that for 0.2 I should stick with the same amount of functions because 5 seemed so easy at first in 0.1, but there were so many unforeseen things that I was stuck on. [dam you hex()]*raises fist into air*

As a result though I can honestly say I have learned a lot by getting past what I was once stuck at in 0.1.