Tuesday, March 25, 2014

Back into Java!

Soooo it has been quite awhile since i last updated this. I hit a bit of a rough road and well i had actually was supposed to be practicing java instead of C# like i had originally been doing.

I'm not sure why but i was definitely having a lot more fun with C# than i was with Java. Java despite doing pretty well in it in the beginning...it just seems so...not fully functional i guess? It's the curly braces that get me! i love visual studios way of doing it where as soon as you type { it auto-completes it with } where as in eclipse when you type the { it stays...nothing happens until you press enter! C'mon give an option with that!!!

Anyways! I did two programs for java!!! The first one is the classic 99 bottles song and there was an intentionally left out a part to the program to make it fully functional. So a while statement around the actual beerNum = beerNum - 1; before it would do 99 minus 1 and stop at 98.

So i added while (beerNum > 0) which concluded the program and i felt great for actually solving that. Thanks Head First ;).

https://github.com/s0nlxaftrsh0ck/Bottles

Secondly is a random buzzword generator that uses an array of words that i've added and uses a random number generator by grabbing the length of the array. Since it grabs the length of the array it has the numbers and it can dump it into random number generator pool. Thanks  to .length

https://github.com/s0nlxaftrsh0ck/Phrases

So far...i'm getting back into the groove of programming ^_^

-Ron

Wednesday, March 12, 2014

Oops..kinda forgot i was supposed to be practicing in java...

Wellll i kinda forgot i was going to be refining my skills and helping my friend code for a potential game he may be doing? I'm going to be freelancing it of course So at the moment this is going to be my final C# project for now. Honestly i'm glad i stopped early enough to not be in toooo deep with C#. So after this we're going back into java!!!

GlazerCalcUltra

https://github.com/s0nlxaftrsh0ck/GlazerCalcUltra

This is a heavily modified version of the original GlazerCalc in that it adds const which is a static value that is can never be changed. It's honestly a very handy tool to use for when you add final type values throughout your program. If an enemy is only 100pts and you have to code that 100pts 300 times...you don't wanna go and change 300 lines of code.

No, so all you have to do is make the const and change the const value and everything else in your coding that correlates to that const value is changed.

This also includes a do -- while loop which does an action while it is still valid. One thing i have noticed in programming is to code in reverse. It's that i have to code for what i DON'T want not what i want it to do.

So in this case instead of searching for values within my range i look for values OUTSIDE of my range which is easier to catch and a little bit neater from the looks of it. But that is something i really should take into consideration however. Sometimes you gotta see from the reverse...or make it an impenetrable fortress perhaps? But yeah. So for now...that is my last C# project.

At least with C# this taught me some fundamentals that i was a little hazy on before. Like operands and expressions, variables. And the likes. But yeah. Good times!

-Ron

Tuesday, March 11, 2014

Finally got in some coding geez...and its tuesday lol

Finally got to do some coding and reading today. Added two different programs this time

https://github.com/s0nlxaftrsh0ck/BottlePrice

basically the same as Glazing calc but calculating bottle amounts. The 99 is to offset the division so as to not give me a 0 as it divides anything less than 100 wil be 0....a bit of a better explanation...

 "If you just divide the number of tablets by 100 an integer division will give you the wrong answer (for any number of tablets less than 100 your program will tell you that 0 bottles are needed). One way to solve this is to add 99 to the number of tablets before you perform the division, forcing the number of bottles required to "round up" any number of tablets greater than 0."

and

https://github.com/s0nlxaftrsh0ck/FloatTest

This is a  program for testing out casting where you tell the program you are sure you are changing it from a larger variable to a smaller one. Something like changing an int into a float.

A float is bigger than an int. If it was int > float there wouldn't be a problem.

But since its float we need to compact it i guess you could say into the int.


Thats...what i gathered so far anyways...

Next time will be if else statements. This refresher course is pretty damned helpful and im glad im taking it back from step one to solidify my understandings of what the hell i was doing in programming. That tis be it for now

Monday, March 10, 2014

Craaaaaaaaap!

Saturday no program studying as well as Sunday...i tried to read a bit on both days. Got a little far on Sunday morning...

As for saturday i put my A+ certification to use and actually opened and closed up my laptop successfully without fucking anything up. Ok, that's a lie, i messed up one of the screws so that doesn't go in correctly. So i did something at least a little productive during the weekend. My reading is slacking again. I need to pick up the pace again...

At least now i know my iFixit kit isn't a total useless purchase. I felt like a loser completely messing up my wifes Note 3 during the screen replacement....i think from now on i'm just gonna replace the digitizer and replace that.

I still feel incompetent however that someone else whose not so tech savvy was able to replace an iPhone screen and i couldn't for the Note 3. I'm guessing it's two completely different methods of screen removals but man...*sighs* still doesn't make me feel any better. Always time to practice with messed up ebay ones right?

-Ron

Saturday, March 08, 2014

Trying to read while sleepy does not work at all...

No coding and very little bit of reading last night. But, i'm still insanely proud of my github and accomplishment ;p. Gonna try to get some reading and coding in today however.

Thursday, March 06, 2014

>.>;;;

Okay  i snuck in one more shot at the github publish through bash and got it to work correctly this time!

https://github.com/s0nlxaftrsh0ck/GlazerCalc

^_^

I just had to let gitbash KNOW it's there as it's tacked as untracked. 'git add' my solution and director, do the git commit -m "add glazercalc.sln" but can't do that with the directory as it's done automatically when you push....


Add the remote origin of my git and do the git push...now why in the hell didn't the github do this...? So odd...is it only done through the bash i guess??? Hm...well these two spots helped guide me through this.

https://help.github.com/articles/create-a-repo
http://readwrite.com/2013/10/02/github-for-beginners-part-2


I hope no one will go "AUGHHH, if you're doing it why are you typing this out for?!?!?"

Honestly its kinda helping me remember. But now i have a feeling theres those who would be thinking "I wasn't thinking that!!!" And for that i apologize. You have permission to throw my cake on the ground on my birthday.

I should also just jot down notes too maybe...and also probably TAG THESE POSTS MAYBE?!?! Mrgrgr...ah well bed time for me.

-Ron

P.S. I'm not sure who else would even be reading this right now so who the hell am i even talking to?!
Finally added some coding and ran it. And it worked out. Also got it soooomewhat running up on github as well and pushed it out. Again somewhat...lol. Honestly as i was typing the code out in visual studio i kept smirking at how the autocompletes work and i missed doing this type of stuff and was pretty damned happy about it. Everytime i looked at my e-mail i had an ssh key for my GitHub and it kept reminding me of what i had to do tonight. Felt pretty good i gotta say. So yeah got a program up and pushed out a repo...somewhat. Maybe it didn't sync up correctly? I don't know...

https://github.com/s0nlxaftrsh0ck/GlazerCalc

Very odd...yeah i still need to mess around with how to push stuff out to git hub. But heres the code of the first program from the book

1    +    using System;
2    +  
3    +    class GlazerCalc
4    +    {
5    +        static void Main()
6    +        {
7    +            double width, height, woodLength, glassArea;
8    +            string widthString, heightString;
9    +  
10    +            widthString = Console.ReadLine();
11    +            width = double.Parse(widthString);
12    +  
13    +            heightString = Console.ReadLine();
14    +            height = double.Parse(heightString);
15    +  
16    +            woodLength = 2 * (width + height) * 3.25;
17    +            glassArea = 2 * (width * height);
18    +  
19    +            Console.WriteLine("The length of the wood is " +
20    +                    woodLength + " feet");
21    +            Console.WriteLine("The area of the glass is " +
22    +                    glassArea + " square metres");
23    +        }
24    +    }
25    +    

Obviously not my code or anything modded about it. Just straight from the book.


By the way there are a lot of coders around the IT Department of me. And i see them coding and i'm like...man i wish i could do that right now. Yeah the Sys Admin stuff is fun but seeing those lines of code just looking so neat and perfect and the colors. yeah...i think i'm gonna have fun honestly.

-Ron

Wednesday, March 05, 2014

Oh.

Dang...from 2005 that was my first and last blog post for almost what.........9 years? Glad they kept this going for awhile? Ahm so yeah...a loooot has happened since that last post but I'm not gonna make this a personal journal blog or anything. I'm gonna keep that jazz outta here and put it up somewhere else. Anyways. I'm making this my projects blog. At least for programming right now. Maybe music or art or something. But right now i'll be focusing on programming mostly. And im gonna focus in on C# for being able to program on the Vita and XNA i guess? But it's very close to java apparently so i can probably cross some stuff on over to android without too much of a problem...

I should probably lay out some goals of some sort as well huh?

My main focus and goal at the moment is to become a better programmer and actually know how to flesh out a program idea i have in my head, lay it out on paper, flesh out flow chart of how i want it to run and try to code it. I will probably look back at this post and say "Oh this mofuggah is so stupid and has no idea what he's getting himself into." So yes....i think im gonna start doing my reading off of this here

http://www.csharpcourse.com/ The Yellow book

And for my compliler shall be hummm...

The classic visual studio express 2013 http://www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop

I t would be great to have these links just in case if i forget and lose them. In case of a hard drive crash. And why the hell not sign up for a github... https://github.com/s0nlxaftrsh0ck

And as i start installing all of this i might as well knock off a few pages of this book.

-Ron