Category: Technical

  • Simple C# Database Application

    image

    Basically, it prompts for a GITI ID, user enters an assignment number from the Education module, and it calls the database server and asks for the class code and the assignment name. Nothing special yet. I’m using the MySQL Connector for ADO.NET. It’s kind of lame, but is my first step towards a version of GITI that doesn’t require a web browser. This version talks directly to SQL, and its designed for an end-user, but my vision is to create a console-based server that will handle authenticating users and things like that, handling the interaction with the database itself. Ideally, the Windows Application will then talk to that server and perform its actions, while also maintaining a local cache of information.

    In PHP, GITI’s native language, what I did looks something like this:

    //get user input for $assID from form
    $sql = "SELECT Code, Assignment FROM `homework` WHERE `ID`=’$assID’";
    $sql_result = mysql_query($sql, $connection);
    $row = mysql_fetch_array($sql_result);
    echo $row["Code"];
    echo " : ";
    echo $row["Assignment"];

     

    In C# it looks a little more like this:

    string assID = tIn.ReadLine();
    string selectStatement = "SELECT Assignment,Code FROM `homework` WHERE `ID`='" + assID+"'";
    MySqlCommand selectCommand = new MySqlCommand(selectStatement, connection);
    connection.Open();
    MySqlDataReader custReader = selectCommand.ExecuteReader();
    if (custReader.Read())
    {
    string ClassCode = custReader["Code"].ToString();
    string AssignmentName = custReader["Assignment"].ToString();
    tOut.WriteLine(ClassCode+" : "+AssignmentName);
    }
    connection.Close();
    Console.Beep();

     

    Both are very simple. In both examples, the connection properties for the server were set before the lines of code shown. C# is more manageable for doing this type of work once the "data assisting" features of Visual Studio 2008 are ignored. I love C# so far, but I am quickly learning that I can learn to love Visual C++ as well, there isn’t a lot different between the languages (why should there be, they both convert back to .NET Assembly). My frustration that I developed with C++ resulted from not ever being able to find documentation that I need about available "classes", and when I did find the classes I needed, they required additional classes to make them work. An absolutely endless cycle. For C#, there are a lot of built in classes for most common functions, and the documentation is plentiful (not the mention Visual Studio’s ability to read and define constructs in the classes as I get to them, providing me with instant ability to use functions). 

    I still have to pick what language I want to take an advanced course in (for my Computer Programming degrees).

  • Promiscuous Web Crawler

    http://arachnode.net/

    This thing has been keeping up with my blog, maybe even more regularly than my normal stalkers do. It has been keeping up with my tags, categories and everything. Its a little bit odd.

    http://arachnode.net/blogs/disturbingthoughts_net/default.aspx

  • Best Argument Against Open DNS

    http://www.publicroot.org/technical/INS-TLD-compilation.txt

    This is a complete list of TLDs that had been detected as in-use on the Internet as of the survey date on the file. This means that a DNS server somewhere on the Internet had to announce the TLD on the Internet. If the DNS system is open, then it is likely that a TLD list that is this fucked up would exist in THE root zone. At present the restricted ICANN TLD registry (maintained by IANA) keeps us safe from this insanity. If you are bored enough, scroll to the K’s and find "Kularski". Any yahoo (its on the list too) can have a TLD presence.

  • Yet another web browser

    It used to be that an Internet user had 2 choices for a web browser, IE or Netscape. Or in short, the browser that worked or the one that didn’t. Nothing ever worked on Netscape, everything worked on IE, then we jump forward a few years and now there is Internet Explorer, FireFox and a variety of lesser used browsers. There is no huge difference in compatibility, except for a few situations of badly written apps. Tomorrow Google will add their attempt to all of this. Google Chrome will be released on Tuesday as a browser designed specifically for web applications.

    I am doubting that Google Chrome will be any more interesting than other modern browsers that copy each other.

  • What contract?

    In the last few days I’ve been working with an individual at my old high school on some problems related to the DNS of the schools domain name. Today one of the emails included the following line:

    "I know this goes beyond the scope of your contract with us, so I just wanted to let you know that I do appreciate the help!!!"

    Its funny in so many ways. There is no contract first of all. I do what I do because I for some reason still care about the school. Second, my only relationship now with the school is that I am the reseller handling the registration for the domain through Enom.

    This person has no idea what she is doing when it comes to the domain name, or the web presence of the school in general.

    In June she received a email telling her that her hosting provider needed her to change DNS servers for the domain because they were changing "platforms" and their robot picked up that the domain didn’t transition. After receiving the email she contacted hosting support, and they told her the domain was registered with Enom. Enom promptly informed her that she had to deal with PCFIRE Domain Services (thats me smile_regular) to get the change made, since she didn’t have web access to the domain. Funny thing here is that she DID and unfortunately still DOES have access to the domain from the web console. She tried emailing me at an address that dropped her directly to SPAM and she called me in a panic trying to get things working. I checked my voicemail 2 days later. I was given very little information about the change that was needed, so I decided to blindly make the change for her and let the burden of DNS rest completely on her. I warned her several times that there may be unpredictable side effects from doing the change.

    I received no reply from her. A few days ago, another panicked email. One of the instructors couldn’t get to their web page because it wasn’t where it was supposed to be. She emailed me to see if maybe it had something to do with the change she ordered. Hmm…. you think it just might? I checked out the website and discovered that it didn’t seem to matter about the external hosting, so I mimicked her existing redirect configuration (domain is on external hosting, just to be redirected) and replied asking if everything was ok. She was extremely happy. Funny thing is… all I did was move the servers back to where they were before June’s little game.

    I suspect I will have to deal with her again in a few days when she finds out that e-mail is not functional for the domain. Apparently Enom stores the domain’s host informations, but not its MX (email) records. I do not remember the server addresses and the email provider doesn’t list them publicly, so I seriously hope when she emails me about that, she is able to provide me with the MX records for the domain. Email was something else she was warned about in June, but I suppose she was just worried about the web presence and not student email, which wouldn’t be relevant until August 25th, in 5 days.

  • WTF?

    A:\CSC153\PROJECTS>dir
    Volume in drive A is DATA
    Volume Serial Number is DCA1-B951
    Directory of A:\CSC153\PROJECTS
    08/19/2008  23:39    <DIR>          .
    08/19/2008  23:39    <DIR>          ..
    08/19/2008  23:39    <DIR>          HelloWorld
    08/19/2008  22:58    <DIR>          InvoiceTotal
    08/19/2008  22:58    <DIR>          VSMacros80
    08/19/2008  22:58    <DIR>          WindowsFormsApplication1
    0 File(s)              0 bytes
    6 Dir(s)  67,751,673,856 bytes free
    A:\CSC153\PROJECTS>cd HelloWorld
    Invalid directory
    A:\CSC153\PROJECTS>cd HelloWorld
    Invalid directory
    A:\CSC153\PROJECTS>cd HELLOWORLD
    Invalid directory

    I really hate that long file-name barrier! It is so easy to go over 8 characters and not even notice.

  • XMPP Status

    Well… I didn’t get the perfectly universal option I wanted, but I did find where Google hides their status information. Google uses the Google Talk Badge to convey status, and also provide a guest access to the system for chatting.

     

    For anyone else doing this, if you are a Google normal user, you will visit the following for your badge:
    http://www.google.com/talk/service/badge/New

    For users of Google Apps, your badge will be available at:
    http://www.google.com/talk/service/a/yourdomain.com/badge/New

     

    I can’t believe I didn’t run across this last night. I guess I wasn’t using the right terms in the Google search engine to make it spit out what I wanted.

  • XMPP PITA

    Last night I started playing with the idea of setting up a status page for myself, like I have considered many times. This time I took a different approach though, I started designing as a non-functional sample page, something I could build from. I started laying out a variety of ways I could provide information, including last GITI login, XMPP (Instant Messenger) status, if there were assignments due, and a direct statement of status from me. Everything seemed easy enough so I started looking for ways to do the friendliest part first (anything not touching GITI). I went out in search of a simple status component for XMPP. I came up blank for something universal, although, some XMPP servers have an HTTP component built in that will serve such information upon request. I then targeted Google Talk, my primary XMPP service. Nothing really came up… a  few mechanisms to call the information from the server on XMPP itself, but that would imply an active XMPP client is checking for it. I feel as though the functionality I am wanting is something that has to exist in Google, but is just buried deep in the API.

    I still haven’t found it, I guess I will keep digging.

  • GoDaddy DNS Rocks!

    I have never been one to compliment GoDaddy Software on anything, but I now believe that all of my negative feelings towards them are due to their previous status… a cheap domain registrar. One of my domains, Kularski.org, was registered through GoDaddy because of an arrangement with Google Apps. Now I am starting to wonder if letting the Enomitron manage my domain portfolio is such a wise idea.

    This evening I was making arrangements to make Kularski.org have a function for myself similar to that of all of my  other Kularski.x domains… to have a separate email functionality for myself under it (not for actual use, just to catch stray mail). Upon trying to enter the information from Google into the DNS records for the domain in the custom DNS panel of GoDaddy I noticed an "import" button, with no context or instruction. I clicked the button, was presented with a generic file upload box, and I thought to myself, "what could they want here?". The only thing that made sense to me was a BIND DNS configuration file… or at least a pseudo-BIND file, using the BIND line syntax.

    CURTIS IN MX 10 ASPMX.L.GOOGLE.COM.
    CURTIS IN MX 20 ALT1.ASPMX.L.GOOGLE.COM.
    CURTIS IN MX 20 ALT2.ASPMX.L.GOOGLE.COM.
    CURTIS IN MX 30 ASPMX2.GOOGLEMAIL.COM.
    CURTIS IN MX 30 ASPMX3.GOOGLEMAIL.COM.
    CURTIS IN MX 30 ASPMX4.GOOGLEMAIL.COM.
    CURTIS IN MX 30 ASPMX5.GOOGLEMAIL.COM.

    Thats all it took to get all of that in there. I didn’t have to click "Add MX Record" 8 times or anything. smile_nerd

    Legacy DNS Configurations lives on!

  • GMail Troubles

    http://gmailblog.blogspot.com/2008/08/we-feel-your-pain-and-were-sorry.html

    This event is only notable because it doens’t happen that often, but yet it happens all the time, just not to Google. Corporate email servers have problems all the time… academic email servers even more often (some have planned weekly outages of 4 hours or more). As I pointed out a week ago in a blog post, not every email system is up all the time, especially not academically.

    GMail is expected to be up all the time, and there is nothing wrong with that expectation, but I think up to this point, they have done a damn good job with system stability and availability.

     

    I personally am a Google Apps user and I didn’t even notice the problem. Usually I’m among the first to notice things and tend to be the first to bitch.