Pages

Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Friday, July 6, 2012

Python

I've been doing a project in Python lately. I'm really interested in it. To start things off, here's a flashback of me when I was 7 years old:
-reading book about business and economy-
"... the best way to sell a product is to listen to what people want, and then create it."
-close book, start listening to what my family wants-

the rest is not important. It's just that line. That line of that book which I don't even remember the title of stuck out to me after all these years for a reason. Who knew in a kid's book, I would find something so genius? Just listen to what people are complaining about, and answer that with a product, and you're set. Easy money. Right?

So, I just kinda had that advice stored somewhere in my brain for 6 years. Recently, I was on Twitter (no duh I'm always on there). A Rioter (someone who works at Riot, the people who produce and maintain the free-to-play game I love, League of Legends) named Rinoa needed help with a computer build. Since I had researched computer builds for a few months before this because I wanted one myself for my birthday, I decided to help.

HERE is where the idea started. I went and found a bunch of good products that Rinoa could use to build her very own hot pink gaming computer. I needed a way to tell her all these products and information about them in 140 characters (curse you, twitter character limit) or less. I found pastebin. Or well, I didn't find it. I had used it before, but only for posting code. Anyways, I pasted all the products into the paste box. Here's the outcome, for those curious:
http://pastebin.com/gp39QVwf

Note the format.
<category>
<item name>
<price>
<url>

I had to go to each of the pages and do this in a very systematic, tedious way. I had to copy/paste 10 things from 4 locations on 10 pages. Not fun. The thing is, I also happen to know an online community who had this same problem a lot. The computing, customizing, and overclocking section of HackForums (obviously I can't speak for them, but in my opinion, pastebin is the best way to give lots of info on a computer build at a glance like that).

So, I took it upon myself to make this my first real Python project. (my first real project, period. I've had others, but this one will be finished and released!)

-take Newegg URLs
-spit out a ton of info about the product
-so far I only have name/price/url
-aiming for name/category/rating/price/url/optional comments

category is hard. rating is semi-easy. optional comments are difficult-ish.

Here's a video of my program in action (so far):

Watching it in anything less the 720p makes it hard to see. Just sayin'. Also, my taste in music is better than yours.

Monday, June 18, 2012

Genius

I once read a series called the "Genius Wars". It was great. There's very few books that include anything computer-related, and there's very few that include anything that's not first grade level computer stuff. This book suited me perfectly, but there was one part that I loved because it described me so much, and made me hate myself.

It was a point in the book where Cadel (the main character, who happens to be an amazingly genius teenage hacker) was feeling particularly sad because he was pretty antisocial. In the bathroom, there were two boys trying to make a small bomb out of something (nothing serious, something that would explode and liquid would fly everywhere). Cadel then showed them how to make it 10 times better. He should have just walked away and accepted that geniuses are not accepted in society. Instead, he basked in the glory of having impressed two people who were far less smart than him, and whose opinion would mean nothing to him for the rest of his life. So, while he was basking in this social acceptance/impressiveness, he realized that he could just keep impressing people and he would be socially accepted for the rest of his life. After he talked to his psychologist about it (who happened to be the protagonist, but also Cadel's father... it's a REALLY good story), his psychologist told him that true geniuses are not accepted in society, because no one understands them properly.

I feel the same way about geeks. Even nerds (yes, there is a DIFFERENCE) have their own little society. Geeks? They're few and far apart (at least, in my age/year/place/life), so there's no group. Geeks are the ones who have spent their whole lives online. I know a few semi-geeks at my school, but gamers don't count. Gamers are the ones who yell "l0l n00b!" at their screen after dying 4 times in a row in Black Ops. 13 year old gamers are the worst kinds of people to deal with. 13 year old PC gamers are a little more acceptable, but they need to have memorized the Fibonacci Sequence up to at least 144, pi to at least 3.141592653589, or semi-know a programming language and how to use it. Otherwise, they're unbearable too. Where was I...? Oh, yeah.

I know no real geeks at my school. I know wannabe geeks, I know /b/ros, I know gamers, nerds, etc. but no geeks. No one who can program, no one who enjoys a computer challenge, no one who has ever encrypted anything in BASE64, no one who has used a keylogger (sorry!), no one who knows what RAM is/does, no one who can tell what 1000 is in binary, etc. I'm not trying to say I'm the only geek, but what I'm insinuating or implying is that I AM THE ONLY GEEK.

Therefore, my level of social acceptance is really low unless I start basking in those moments when I impress people. I hate impressing people though, because then
  1. They take you for granted sometimes. Oh yeah, he did that one cool thing, but he can't do anymore.
  2. You start making a name for yourself, but you're still just that one kid who can do that one thing with the computer thingy
  3. I realize, "Hey. This will mean nothing to me next week, next month, next year, next decade, etc. It only means something to me in this moment. Why am I trying to impress this stranger again...?"
  4. Then I realize, "Oh, it's because there's no other way I can bring up a conversation with anyone because they talk about stuff like sports/normal people things and I just say "...k."
  5. Then I realize, "If we had a geek here, I could talk about anything/everything to them, but we don't, so I can't."
So, yeah. Basically my points are these:
  • Social acceptance
  • it's fucking HARD if you're a geek

Friday, June 15, 2012

DAHS.

DAHS = Division Avenue High School. Yeah. I'm going there. Soon. It's exciting. It's getting me to type in short, quick bursts (and talk the same way) whenever I talk about it. High school! I've read up on it, online. People have posted things like "you don't realize how much middle school sucks till you reach high school" and other stuff. That excites me, too. It's like, wow! High school! That's the place where things happen! That's the place! Anyways, I was visiting their website.

http://www.levittownschools.com/dahs/.

It looks terrible right now. Not gonna lie. I might work on it this summer. Even if I can't use PHP/JS that well yet, I might as well just make some new art for the pages in PhotoShop or something. More on that later, because I don't want to talk about it and then not do it or something.

So, yeah. High school! The journey starts soon. Feels strangely like the beginning of a Pokemon game. Where Oak gives you the first pokemon of your life and you're like "Holy crap!" and then you start your journey. That's what this feels like. I'm relatively happy with my life right now. You may or may not be able to tell by my choice of words and phrases and things. w00t. High school. Division Avenue High School. The Division Blue Dragons! Well. Back to fixing my computer. It's not booting up. Gonna reinstall windows. Hopefully this reinstalling of Windows will be better than my last time. Alrighty then. Back to work!

Friday, June 1, 2012

School + Whatver Else Was On My Mind When I Wrote This

Wow. Just found out my blog isn't blocked at school. May or may not actually make use of this. People behind me are playing cards and laughing. About 75% of the kids in 8th grade are on a school field trip, to Washingon D.C. That means

// okay. So I was in class, and apparently blogging isn't allowed.
// ( it is, but our substitute was kinda harsh )
// I'm gonna continue the story from my current perspective.
// it's half an hour after me getting kicked off the class computer.
// I asked to go to the library. I'm currently typing this on a school library computer.
// anyways, continuing story now.

That means people who didn't go on the trip got grouped together, and now we're going from class to class just chilling. Some are playing cards, some are cursing out the teacher (not gonna go too far into detail, but that was hilarious), and some are watching wrestling matches online (he got kicked of the computer for this too, at the same time I did). Our anonymous teacher (I'm not gonna call anyone out online) was a bit angry at some of the kids in our class, and she didn't seem to be very happy in general. That was possibly the most hilarious 42 minutes of my life.

I'm gonna go play some online games now (I don't know why I said go play, considering I'll still be sitting in the same spot and fully able to keep blogging), because I can't execute any code on these computers besides javascript in the browser (and that's only entertaining the first few times, and then you show it to one person who shows it to everyone and it's not impressive to anyone anymore :( ). The end of that last sentence was confusing because I had a frowny face and a close paren really close to each other. But yeah, most coding related websites are blocked as well (codeacademy is actually the only one that came to mind, because it's the only "coding" site I've tried to go on in school). Some people ask me why I don't just bypass security (it's actually really easy, the school doesn't know much about Tor or booting into Linux or web proxies (werll okay they know about them but it's easy to take the source code for one and upload it to your own website)), but I hate going through all the trouble when it takes 5 hours to load a page. If I just wait until I get home, I have unlimited access to anything on the internet which is amazing for me. I'm surprised my blog wasn't blocked (well the actual blog is, but the dashboard is fine, which is why I can post this.)

So this is probably my conclusion. I felt like writing one this time; normally I don't. I'm gonna think of a really deep quote to end this with.
"They don't think it be like it is, but it do." - Oscar Gamble
(Wow I can't believe I remembered the guy's name) (I promise I didn't google it this time)

GGWP.

Sunday, May 27, 2012

C++

It's fun. I wanna make a program. I made a FizzBuzz thing where it goes through a list of numbers, and if a number is divisible by 3 or 5 it'll replace it with "Fizz" or "Buzz", respectively. (Also, if it's divisible by both, it'll print "FizzBuzz". I need to get started on GUIs, because I want to make an open-source program (or at least help with one!)


Wednesday, May 23, 2012

Programming Flow

I'm a geek. It takes a lot for me to get stimulated. I'm so used to doing lots of things at once. I'll be doing my homework, listening to music, browsing the internet, and talking to someone on Skype at the same time some days. So, when I'm programming, I can't stand doing it in silence. So I put music on. Usually, music like rap or something upbeat is what I listen to. I've tried other genres, but rap is usually the best. Jay-Z is awesome for "programming music" (a new term coined by yours truly!), but I think anything that rhymes well is good. Anything that has a nice flow, actually. I'm gonna call it the "Programming Flow".

Wednesday, May 16, 2012

Conclusion of Beginning.

Here's a quick summary of the beginning of my blog:
-Default template because I can't code
-Just realized this will never show up on Google because I don't know SEO

-Inconsistent posts. I made 3 tonight, might make 0 for 4 days and make 7 on the 5th day.



//edit. Looking back on this, I like this post. A lot. Default template because I can't code has been semi-fixed. This site shows up on google when you google "Arnav Is A Boss". My posts? Still inconsistent as hell. :)