Eponymous
   



About
My Infrequently Updated Blog. The web-based journal of M. Forde, computer nerd, endurance athlete, and DeLorean owner


contact

Subscribe
Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.

Flavors
There's more than one way to view this weblog; try these flavors on for size.

  • index
  • circa 1993
  • Sections

  • main
  • musings
  • running
  • DeLorean
  • code
  • unix
  • album
  • TBM
  • Archives

  • 2022
  • 2021
  • 2020
  • 2019
  • 2018
  • 2017
  • 2016
  • 2015
  • 2014
  • 2013
  • 2012
  • 2011
  • 2010
  • 2009
  • 2008
  • 2007
  • Disclaimers, Copyrights, Privacy, Etc.

  • ToS
  • Copyrights
  • Links

  • olix0r.net
  • netmeister.org
  • Giraffes
  • Eat. Run. Sleep.

  •        
    09 Aug 2016

    He's Not Wrong...
    Over at Net Meister there's a nice peice entitled Things They Don't Teach You in School". A lot of what Jan has to say is spot-on observation and good advice.

    It's definitely worth a read.

    [/code] [permanent link]

    28 Apr 2014

    Looking back...
    As I look back at code I wrote a decade ago as an undergrad, I often find lots of little things that can be done better. For instance, in one file I found that reversing the order in which two functions were called would have eliminated a half dozen conditionals from one of the functions and would have resulted in the same expected behavior, but with fewer lines of code and a lower cyclomatic complexity.

    [/code] [permanent link]

    10 Dec 2013

    Thoughts on National Computer Science Education Week
    This week is apparently National Computer Science Education Week. Code.org is organizing the "hour of code" to promote teaching of Computer Science and Programming in schools. They're also organizing petitions to make CS courses count as credits in Mathematics or Science for High School graduation requirements.

    In High School, my CS courses were by far my favorites, Programming in Pascal, AP Comp Sci in Pascal, Programming in C++, and AP Comp Sci in C++ ( the language for the exam switched my junior year). I learned a lot about structured code, elegant, efficient code. I learned enough about Data Structures and Algorithms that I didn't have to study for my college CS classes until Computational Structures (Discrete Math II with Scheme, essentially) in my third semester. I had an amazing Computer Science teacher who also taught me Calculus and the proper order of precedence in life: God, Family, Math. I wouldn't be where I am today without that educational opportunity I had in High School. I want others to have that opportunity too.

    However, this is where I differ with the opinion of the Code.org folks. I do not believe that CS classes should count toward the Math or Science requirements. In this state, CS counts toward the "practical or performing art" requirements, I'm assuming under the "practical" label. I think this is a better place for it at the High School level.

    Computer Science is not a hard Science. It's not Physics. It's not Biology. It's not Chemistry. There's a saying that if the subject has science in its name, it's not really a science. That is true with Computer Science. It's not studying the how and why of atoms, of molecules, of living systems, of anything really. It's not science.

    Computer Science is really applied mathematics. I am very fortunate that the college program I went through was very strong in mathematics: Calc I and II, Linear (Matrix) Algebra, Discrete Math, Discrete Math II in the guise of Computational Structures, Probability and Statistics, Theory of Computation, Algorithmic Analysis... the list goes on. All of these mathematical foundations were then applied to a machine, to make the machine carry out a task in an efficient manner. It's those mathematical foundations that are the true core of Computer Science.

    While mathematics is the core of Computer Science and Computer Science is essentially applied mathematics, I do not believe it should count toward the Math requirements. The CS classes would likely detract from other mathematics courses such as Geometry, Trigonometry, and Calculus. These courses are far too important to an education to be replaced by a Computer Science course. Many, maybe even most, High School Computer Science courses focus more on "programming" than the fundamental mathematical theories. They will pick the language du jour and teach you the syntax and semantics. They'll teach about basic data structures like arrays, and linked lists. The AP exam currently focuses not on implementing lists, trees, stacks, queues, and sorting and searching algorithms, but on arrays and lists using Java library calls. This is not math. This is learning Java syntax.

    [/code] [permanent link]

    20 Aug 2012

    unHide
    After a friend's computer became infected with some malware that hides files in your home directory and tries to extort money from you in order to "recover" your data, I was inspired to write this little program.

    All it does is search for hidden, non-system files and unhides them. It defaults to the user's home directory (My Documents), but other directories can be chosen.

    If anyone wants to try it out, please do. If you do try it, let me know what parts I can do better. I primarily work on embedded systems and Unix daemons professionally; the user only knows my software exists when it isn't working. As such, I have very little experience with GUIs or human-computer interactions. Any feedback would be much appreciated.

    The Windows executable can be found at: http://www.skinnymf.com/~mforde/unHide/. Source code is available upon request.

    [/code] [permanent link]

    01 Mar 2012

    Just a Question
    Given the following code fragment, I was asked to implement foo such that the program would output "America." How would you do it?

            int main()
            {
              char *p = "Hello";
    
              foo(         );
              printf("%s",p);
    
              return 0;
            }
    

    My solution involved allocating new memory from the heap to store the new string, and changing p to point to that buffer. They didn't like that answer. They preferred the method of putting the new string in the data segment as well.

    I personally would always avoid that, whenever possible. "Hello" is stored in a read-only area of memory as is "America" in their preferred solution. Any attempt to alter those strings will trigger a segfault. This is an accident waiting to happen.

    [/code] [permanent link]

    19 Apr 2011

    It's not magic, it's C.
    I love reading comments like

    /* These defined magically in the linker script. */
    I found that in the GNU Standard C Library implementation when GCC told me the the variables to which the comment referred were undefined. I guess that linker script isn't magic after all...

    [/code] [permanent link]

    19 Oct 2009

    C#, XNA, and 8 Queens
    I spent some time this weekend learning some C# and getting working a bit with the XNA framework. I implemented a solution for the 8 Queens problem in C++, then ported that class to C#. After getting that working in Windows, I started moving it to the Xbox.

    It works there with little issue, but, as expected, writing to system.console doesn't produce useful output. My next step is to get some sort of graphical representation of the chessboard displayed with the solution set.

    [/code] [permanent link]

    17 Oct 2009

    XNA
    As of this morning, I am now a member of the XNA Creators Club.

    [/code] [permanent link]

    14 Oct 2009

    Self Documenting Code
    Despite what you think about your code, it is not self documenting. When writing code add comments, describe what a function does, explain why you're using that convoluted pointer arithmetic and bit shifting. I'm sure it makes sense now, but someday you'll have to go back and look at it and figure out what the hell you were doing. Or worse, I'll have to go back and look at it and figure out what the hell you were doing.

    Sometimes it is important to have some sort of separate documentation for the code; maybe some UML or ER diagrams, maybe some English text. Use what ever it takes to explain what you were doing. Do not paste snippets of your code into the text and call it documentation.That is not documentation, that is code.

    [/code] [permanent link]


       
    Eponymous
    Eponymous
       



    About
    My Infrequently Updated Blog. The web-based journal of M. Forde, computer nerd, endurance athlete, and DeLorean owner


    contact

    Subscribe
    Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.

    Flavors
    There's more than one way to view this weblog; try these flavors on for size.

  • index
  • circa 1993
  • Sections

  • main
  • musings
  • running
  • DeLorean
  • code
  • unix
  • album
  • TBM
  • Archives

  • 2022
  • 2021
  • 2020
  • 2019
  • 2018
  • 2017
  • 2016
  • 2015
  • 2014
  • 2013
  • 2012
  • 2011
  • 2010
  • 2009
  • 2008
  • 2007
  • Disclaimers, Copyrights, Privacy, Etc.

  • ToS
  • Copyrights
  • Links

  • olix0r.net
  • netmeister.org
  • Giraffes
  • Eat. Run. Sleep.

  •        
    07 Oct 2022


    I'm looking California and feeling Minnesota

    [/musings] [permanent link]


       
    Eponymous
    Eponymous
       



    About
    My Infrequently Updated Blog. The web-based journal of M. Forde, computer nerd, endurance athlete, and DeLorean owner


    contact

    Subscribe
    Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.

    Flavors
    There's more than one way to view this weblog; try these flavors on for size.

  • index
  • circa 1993
  • Sections

  • main
  • musings
  • running
  • DeLorean
  • code
  • unix
  • album
  • TBM
  • Archives

  • 2022
  • 2021
  • 2020
  • 2019
  • 2018
  • 2017
  • 2016
  • 2015
  • 2014
  • 2013
  • 2012
  • 2011
  • 2010
  • 2009
  • 2008
  • 2007
  • Disclaimers, Copyrights, Privacy, Etc.

  • ToS
  • Copyrights
  • Links

  • olix0r.net
  • netmeister.org
  • Giraffes
  • Eat. Run. Sleep.

  •        
    24 Dec 2012

    Christmas Eve
    On Christmas Eve, I headed out around 7:00PM to take a look at the Christmas lights and decorations around town. There was a snow storm predicted for around 9:00PM, so I decided to take the DeLorean out for one last drive before the Wonderful Winter Weather(TM).

    The snow started much earlier than expected. The snow was light and slow, and despite the car not handling well in slick conditions, I kept going for a while.

    As I was driving I had the realization that I was having an experience no one else in the world has ever had. I was driving a DeLorean through my town on Christmas Eve, admiring Christmas lights and listening to Christmas music as snow fell.

    I looked over at the empty passenger seat and wished there had been someone, anyone there to share this with. So for now, until circumstances like this arise again, I will continue to be the only person to have experienced this.

    When I got home, I took this photograph.
    Snow Covered DeLorean

    [/dmc] [permanent link]

    02 Dec 2012

    Happy Birthday

    I'm starting to get used to celebrating my birthday at TBM concerts. This year it was about a week prior to my birthday at a show on December 1 held at New York's Gramercy Theatre.

    Along with the tickets, I had also purchased the "VIP package." This package included an autographed poster signed by all members of the band, a "VIP" laminate on a lanyard, and... the opportunity to meet the band prior to the show!

    You may be thinking, "But they stick around after shows and mingle with their fans anyway," and "You've already met them a few times!" Both are true. And even with this "VIP" package meet-and-greet, they still make time for all their fans after the show. What this provided was a somewhat quieter meeting in a more intimate setting.

    In fact the meeting was in a small lounge beneath the concert hall. Dim mood lighting, mirrors, and couches set the atmosphere. I spoke with Rainbow, Michael, and Nate first. Rainbow informed me his name was Michael also and made a joke about the "power of the three Mikes lighting the room." After a bit, they started moving me to Chibi who was sitting on a couch after injuring her knee during a show two nights prior. She tried to walk to me, but I told her not to. She said, "I'll meet you half way then."

    I gave her a get well card, knowing she had had surgery on her vocal chords about 8 weeks prior and recently injured her knee. Someone decided we needed a photo of that and she gave me the card back so I could give it back to her. I believe it was Owen who said, "Act natural and hold it for 30 seconds!"

    I asked Rainbow about writing "Unfamiliar" because both he and OE were given credit in the liner notes. He said it was mostly OE; OE started it and Rainbow had finished it. I said I wanted to thank them because it was a song that had taken on some greater meaning to me and I relayed a brief version of the story of the moment I recognized that. It turns out "Unfamiliar" is one of Chibi's favorite songs too.

    Every one of the bands that night were amazing. All, remarkably, were performing as duos. Creature Feature was a real fun band to see. Their music is heavily influenced by old horror movies which gives them a dark yet fun sound.

    Aesthetic Perfection put on a good performance. Their drummer is amazing and fun to watch. They heavily synth-based and while there was a dark tone to most of their songs, they still had fun and lightened things up with a Fine Young Cannibals cover.

    William Control was the only other act I had heard before the show (Thanks Last.fm!). He was great live and I'd love to see him again. He reminded me a little of Dommin in that Dean Martin meets Glen Danzig sort of way.

    The Birthday Massacre was great. They played a good mix including songs from every album. For most of the set Chibi was sitting on a speaker placed near center at the front of the stage, wearing a knee brace. She stood up and moved around occasionally, but not much. At one point Rainbow sat down on another speaker and stuck out one leg in a similar fashion to how Chibi was seated and laughed a little. It was easy to tell by their interaction here that Chibi and Rainbow are close.

    If you care (or even if you don't), their set list follows:
    • Night Shift
    • Down
    • Control
    • Always
    • Red Stars
    • Video kid
    • Lover's End
    • Forever
    • Pins and Needles
    • Happy Birthday
    • Alibis
    • Calling
    • In the Dark
    • Sleep Walking
    • Midnight
    • -- Encore --
    • Leaving Tonight
    • The Long Way Home
    • Blue


    The band did not leave the stage prior to the encore as they normally would. Chibi said, "This is the part of the show where we say thank you and leave and you clap and we come back out and play some more. But I'm not going to walk down those stairs anymore than I have to, so do you want to hear three more songs?"

    [/tbm] [permanent link]

    Happy Birthday

    I'm starting to get used to celebrating my birthday at TBM concerts. This year it was about a week prior to my birthday at a show on December 1 held at New York's Gramercy Theatre.

    Along with the tickets, I had also purchased the "VIP package." This package included an autographed poster signed by all members of the band, a "VIP" laminate on a lanyard, and... the opportunity to meet the band prior to the show!

    You may be thinking, "But they stick around after shows and mingle with their fans anyway," and "You've already met them a few times!" Both are true. And even with this "VIP" package meet-and-greet, they still make time for all their fans after the show. What this provided was a somewhat quieter meeting in a more intimate setting.

    In fact the meeting was in a small lounge beneath the concert hall. Dim mood lighting, mirrors, and couches set the atmosphere. I spoke with Rainbow, Michael, and Nate first. Rainbow informed me his name was Michael also and made a joke about the "power of the three Mikes lighting the room." After a bit, they started moving me to Chibi who was sitting on a couch after injuring her knee during a show two nights prior. She tried to walk to me, but I told her not to. She said, "I'll meet you half way then."

    I gave her a get well card, knowing she had had surgery on her vocal chords about 8 weeks prior and recently injured her knee. Someone decided we needed a photo of that and she gave me the card back so I could give it back to her. I believe it was Owen who said, "Act natural and hold it for 30 seconds!"

    I asked Rainbow about writing "Unfamiliar" because both he and OE were given credit in the liner notes. He said it was mostly OE; OE started it and Rainbow had finished it. I said I wanted to thank them because it was a song that had taken on some greater meaning to me and I relayed a brief version of the story of the moment I recognized that. It turns out "Unfamiliar" is one of Chibi's favorite songs too.

    Every one of the bands that night were amazing. All, remarkably, were performing as duos. Creature Feature was a real fun band to see. Their music is heavily influenced by old horror movies which gives them a dark yet fun sound.

    Aesthetic Perfection put on a good performance. Their drummer is amazing and fun to watch. They heavily synth-based and while there was a dark tone to most of their songs, they still had fun and lightened things up with a Fine Young Cannibals cover.

    William Control was the only other act I had heard before the show (Thanks Last.fm!). He was great live and I'd love to see him again. He reminded me a little of Dommin in that Dean Martin meets Glen Danzig sort of way.

    The Birthday Massacre was great. They played a good mix including songs from every album. For most of the set Chibi was sitting on a speaker placed near center at the front of the stage, wearing a knee brace. She stood up and moved around occasionally, but not much. At one point Rainbow sat down on another speaker and stuck out one leg in a similar fashion to how Chibi was seated and laughed a little. It was easy to tell by their interaction here that Chibi and Rainbow are close.

    If you care (or even if you don't), their set list follows:
    • Night Shift
    • Down
    • Control
    • Always
    • Red Stars
    • Video kid
    • Lover's End
    • Forever
    • Pins and Needles
    • Happy Birthday
    • Alibis
    • Calling
    • In the Dark
    • Sleep Walking
    • Midnight
    • -- Encore --
    • Leaving Tonight
    • The Long Way Home
    • Blue


    The band did not leave the stage prior to the encore as they normally would. Chibi said, "This is the part of the show where we say thank you and leave and you clap and we come back out and play some more. But I'm not going to walk down those stairs anymore than I have to, so do you want to hear three more songs?"

    [/musings] [permanent link]