nullcoding's Profile User Rating: -----

Reputation: 3 Apprentice
Group:
Active Members
Active Posts:
99 (0.12 per day)
Joined:
08-July 12
Profile Views:
1,238
Last Active:
User is offline Jun 28 2013 08:00 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Who Cares
Favorite Browser:
FireFox
Favorite Processor:
Intel
Favorite Gaming Platform:
PC
Your Car:
Chevrolet
Dream Kudos:
0

Latest Visitors

Icon   nullcoding has not set their status

Posts I've Made

  1. In Topic: It's 2013. Why is C++ still being taught like C with classes?

    Posted 28 Jun 2013

    I never learned C or C++ formally, but rather on my own using nothing but internet resources and trial-and-error. The entire concept of "classes" was actually completely foreign to me until I'd been programming for several months, and up to that point, my code was generally poorly organized and all but impossible to navigate (Skydiver probably remembers...thank you for your patience!)

    I paged through the K&R book (a very early edition, too) a few times for reference, and it was pretty helpful to get me started, but right from the start I knew that C++ was a lot different from C. Perhaps not at first, but what I like is that one can write an entire functional program without using traditional C-style constructs...or write an entire program that's almost pure C but with the additional "user-friendly" tweaks of C++.

    Certain common frameworks based on C++ are class-based, though - Qt comes to mind, for instance. Glance at the official Qt documentation sometimes - class this class that. Then again, Qt is designed for people who already do cross-platform programming in C-based or C-like languages, like Java, so from what I gather it's designed to be interchangeable and familiar right from the start.

    I've often thought about how I'd teach an introductory class, or really any class, but I have a tendency to make things too complicated. The whole idea of classes, and indeed OO programming in C++ to begin with, can seem a little strange, especially to people who know about C# and Java and therefore have a hard time figuring out the differences between, say, C# classes and C++ classes, both high- and low-level. I still haven't totally grasped it myself, but then again, I'm not using "pure" C++ most of the time.
  2. In Topic: Sloooow function, long execution, why?

    Posted 10 Mar 2013

    Yup, cURL did it. They must not like httpd requests or whatever. Can't say I blame them. Especially from a random Amazonian IP.

    Execution time down from 2115 seconds to 51 seconds. :P

    Thanks for the tip. The entire cloud-based backend is functional now!
  3. In Topic: Sloooow function, long execution, why?

    Posted 10 Mar 2013

    It's Amazon EC2, so I have full control over what I install on (in this case) Ubuntu Server. I happen to know that cURL is installed. So, I'll try that!
  4. In Topic: Sloooow function, long execution, why?

    Posted 10 Mar 2013

    Their API is designed well enough, although it's not really a full API...more like "format your URL like this and you get a JSON yay!" The problem is that their database is not really laid out sequentially. You'd think it would start at item #0 and work its way up to somewhere in the ~37.000 range (from what I hear, that's how many they've got), but no, the numbers assigned to different entries are based on random stuff like how long it's been around (smaller numbers) and more recently its "category," which just further complicates things as it's all very closed-source.

    They probably are throttling my requests, which is weird because I'm making 66 or so whereas sites (read: fansites) that maintain what are essentially mirror databases of their own will make over 37.000 a day.

    But yes, it's worth mentioning that while I was in the process of writing the retrieval script, to make sure it worked I made a test JSON with one item and it would always take between 30 and 32 seconds to get data just for one.

    Interestingly, I'd done the exact same thing in Java and it would take seconds to retrieve data for the whole list!

    Thing is, I want to automate the creation of a master JSON because the Java program was querying the database each time I selected an item from the list, resulting in hundreds of requests instead of a flat number.

    Also the value I want to retrieve only changes once every 24 hours anyway.

    Hmm.

    I'll have to ask the controlling company about their throttling policy. Maybe I should use cURL? In any case, I'm a moderator of their official forums, which is an invite-only position, so hopefully they'll know that I'm not out to write any kind of malicious code!

    Thanks for the tips. I'll try the sleep(1) anyway, just to see if it has any effect.
  5. In Topic: Simplest way to utilize XML?

    Posted 26 Feb 2013

    Okay, thank you!

    I will simply have to learn more about JSON, then. It's not that bad as is - I simply compiled the org.json package from, well, json.org...just gotta figure out a working method of obtaining the specific string (just an integer) that we need and then we're off.

    I certainly have no qualms about foregoing XML altogether. I know a fair bit about it through using BOINC, as any and all end-user customisation or tweaking is done via the editing or creation of XML files, which are then read in Perl and the rest is a mystery to me.

    The site from which we are pulling data is written almost entirely in Javascript. In fact, I think it IS entirely Javascript, which would explain the long load times, and also why we want to keep our own centralized database to reduce querying them all the time.

    JSON it is, then! Thank you for the tips, as always.

    I promise this program has nothing at all to do with prime numbers. :)

My Information

Member Title:
D.I.C Head
Age:
22 years old
Birthday:
July 15, 1992
Gender:
Location:
Newtown Square, PA, USA
Interests:
photography, computer repair, programming, guitar, music composition, coffee
Full Name:
Jaska Börner
Years Programming:
1
Programming Languages:
C,C++,VC++,Qt,Objective-C,Windows API,Cocoa,Java,Android,PHP,HTML5,CSS3,JS

Contact Information

E-mail:
Private
Website URL:
Website URL  http://jaska.me
Skype:
Skype  nullcoding
LinkedIn:
http://www.linkedin.com/in/nullcoding
Facebook:
http://www.facebook.com/NullCodingOfficial
Twitter:
nullcoding

Friends

nullcoding hasn't added any friends yet.

Comments

nullcoding has no profile comments yet. Why not say hello?