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.

  •        
    31 Aug 2008

    Writing

    "You need strong emotion, whether it's fiery or depressed, an extreme state of mind. I think in any art form it's the case." -- Daniel Ash


    Maybe it's my lack of experience. Maybe it's my lack of talent. I tried to sit down and write music for the song known as Ravage in the new naming scheme, but I failed miserably. When I try to force it, like I did tonight, nothing comes out right. I have ideas, I can hear them in my head, but without that inspiration, without that emotion, nothing I produce sounds right.

    I've been too happy recently and it's destroyed my creativity. I get the urge, I have the inspiration, to write when I feel negative emotions. I need anger; I need depression. It is in dealing with these emotions that I am able to write.

    I have tried several times to force myself to feel this way. This usually buys me a few minutes in which I can write, but it often fails. Because the emotions are artificial, the results are mediocre at best.

    I find this situation to be quite frustrating. I want to move forward with this album, but without that inspiration I am unable to do anything.

    In the meantime, I'm slowly teaching myself to play guitar and, to a much lesser extent, a keyboard-style synthesizer. I've also been going through materials my music teacher friend gave me to learn some basic music theory. Hopefully once I find that needed inspiration, or find a way to work without being angry or depressed, this new knowledge will make things easier.

    [/album] [permanent link]

    29 Aug 2008

    NIN
    On August 27th, I attended the Nine Inch Nails concert in East Rutherford, NJ held at the arena. I think I enjoyed it.

    I ordered a pair of tickets through nin.com during the presale. Tickets went on sale at 5:00PM, I managed to get through by 5:05 and ended up with two tickets for Section 121, Row 8, opting not to purchase floor seats. I went with a friend with whom I've attended a number of concerts, including the Bauhaus/NIN show at PNC Arts Center in 2006.

    As per the terms of the nin.com presale, we had to pick up the tickets at the venue. Because of this fact, and the massive amount of pointless and unnecessary construction at the Meadowlands, we decided it would be best to get there early.

    My friend took the night off from work and I picked him up at his apartment after I got out of work. We grabbed a quick meal at a nearby Wendy's (which I'm still paying for...) and then headed over to the arena.

    We arrived around 5:30PM, about two hours before the show. We asked one of the security staff if the box office was open because we had tickets waiting at Will Call. He informed us that the box office opened several hours prior and we could pick up our tickets.

    We headed toward the box office and found a long line. We waited for a few minutes and noticed that the line had not moved at all. Figuring that a line for Will Call would be moving slightly faster than not-at-all, I went to investigate while my friend saved our place in line.

    After a short walk I found another line marked by a sign reading "NIN.COM PRESALE TICKET HOLDERS." I asked the event staff member near the line if that was the line to pick up the tickets. He explained the procedure to me.

    I went and got my friend from the other line and explained to him what the staff had just told me. He then waited outside while I walked into the box office, passing event staff who asked if I was picking up the presale tickets. Inside, another staff member indicated I could pick up the tickets on line 13 or 14. I picked up the tickets, went back outside and we got on line. The staff member who had explained the procedure to me came over to us, checked our tickets, and gave us wrist bands.

    A little while later, just before the gates were set to open, another staff member came down the line checking people's tickets. He looked at ours, cut off our wrist bands, and told us to skip the line and enter the arena through the box office lobby. It seems people with lower section tickets were let in while people with General Admission floor tickets remained on the line.

    Once inside the door, we waited on another line for about 30 seconds to have our tickets scanned for entry into the arena. On the other side of the turnstile, an escalator brought us up to the main floor. We walked around realizing we came in almost directly opposite our section. We stopped at one of the entry ways to have a look at the stage. The staff member at the entry asked to see our tickets. We told him we were on the other side but just wanted to take a quick look at the stage. He had no problem with this. I asked him if he new what time the opening act would be start and he replied, "7:30." I then asked if he knew what time Nine Inch Nails would go on. He took a piece of paper from his pocket, unfolded it, then said, "They'll be on from 8:40 to 10:55." I thanked him and we moved on. We found our section and went down to our seats.

    It turns out that row 8 is actually row 3. We were at the level of the stage and about a hundred feet away. We were angled enough to have a view of almost the entire stage (the lights on the stage right we facing away from us).

    After that we then decided to walk around for a while since we had quite a while until the openers started.

    I stopped and purchased an overpriced souvenir t-shirt at one of the merchandise stands. I should have gotten it a size smaller than I did. I'm still not used to not being overweight. We stopped at a concession stand and payed way too much for water, then did a few more laps around the arena. Finally we went back to our seats.

    At 7:30 the opening act, Does it Offend You, Yeah?, took the stage. They were pretty good. I enjoyed their music despite having heard only one song prior to that evening. It was hard to hear their vocals because the gain on the microphones seemed to be a lot lower than it should have been, especially while they were playing. They thanked the crowd for not booing. When the announced that their next song would be their last for the evening, people cheered. The guitarist quickly replied, "Thank you to all the people who cheered because they like us."

    I was fairly impressed by their set and wish it had been a little bit longer, maybe another song or two.

    At 8:45 Nine Inch Nails took the stage as 999,999 played. As soon as it ended, 1,000,000 started. The continued with a few more songs from The Slip. After Discipline, the band tore into March of the Pigs. The crowd exploded.

    The band made extensive use of three screens, which could be raised and lowered, throughout the night. During The Warning and Vessel, the screen to the front of the stage obscured most of the stage as the instruments used for the almost-acoustic Ghosts set were set up. Justin Meldal-Johnsen played a bass violin during the Ghosts set, which included a new rendition of Piggy.

    After that part of the evening's set, the front screen was used again to hide the stage as the instruments were removed during the next song, which featured an animation set to the music and live video of Trent Reznor being processed on-the-fly to distort his image. I think the only way to describe the processed video is to say it looked like white noise in the shape of a person's face.

    At the end of that song the screen turned completely blue. As Pinion played, the screen's lights were turned off in a rather unique way until the screen did little to obscure the band. The screen was raised quickly as the band tore into Wish, followed quickly by the classic Terrible Lie.

    The entire 31 song set, including the five song obligatory encore was about 2 hours and 15 minutes. It was an amazing show. The set highlighted the musical ability and range of the performers and featured songs from all of NIN's major releases. The visual element of the show was well thought out and very well executed, adding to the music rather than distracting from it.

    I took a few pictures using the low-res camera built into my phone. There is one of the stage, the foremost screen, and Trent during Hurt.

    Setlist:

    • 999,999
    • 1,000,000
    • Letting You
    • Discipline
    • March of the Pigs
    • Head Down
    • The Frail
    • Reptile
    • Closer
    • Gave Up
    • The Warning
    • Vessel
    • 5 Ghosts I
    • 17 Ghosts II
    • 19 Ghosts III
    • Ghosts Piggy
    • The Greater Good
    • Pinion
    • Wish
    • Terrible Lie
    • Survivalism
    • The Big Come Down
    • 31 Ghosts IV
    • Only
    • The Hand That Feeds
    • Head Like a Hole
    • - Encore -
    • Echoplex
    • God Given
    • The Good Soldier
    • Hurt
    • In This Twilight

    [/musings] [permanent link]

    26 Aug 2008

    JTHM

    There's nothing terribly wrong with feeling lost, so long as that feeling precedes some plan on your part to actually do something about it. Too often a person grows complacent with their disillusionment, perpetually wearing their "discomfort" like a favorite shirt. I can't say that I'm very pleased with where my life is just now... But I can't help but look forward to where it's going.

    -- Jhonen Vasquez, "Johnny the Homicidal Maniac: Director's Cut"

    [/musings] [permanent link]

    The DNC Hates Unix Users Pt 2
    Looking through this script, it appears that DNC is relying on Microsoft's Silverlight plugin. Currently, this browser plugin is supported for a limited selection of browsers on a limited selection of operating systems. A relatively complete list of supported platforms can be found here.

    Knowing full well how limited the support for this technology, the DNC still decided this was the best solution.

    I hope the RNC will use technologies that are more cross-platform than this. Currently the video available at their site is based on Flash. While Flash support is a bit shaky outside of Windows and Mac OS, it is supported in Unix.

    [/politics] [permanent link]

    25 Aug 2008

    The DNC Hates Unix Users
    Just confirming the Slashdot story (http://news.slashdot.org/news/08/08/25/229210.shtml):

    We're sorry, but the Democratic Convention video web site isn't compatible with your operating system and/or browser. Please try again on a computer with the following: Compatible operating systems: Windows XP SP2, Windows Vista, or a Mac with Tiger (OS 10.4) or Leopard (OS 10.5). Compatible browsers: Internet Explorer (version 6 or later), Firefox (version 2), or, if you are on a Mac, Safari (version 3.1) also works.


    My User Agent string is currently "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.3) Gecko/20070527 Firefox/2.0.0.3"

    So not only does the Vice Presidential nominee want to expand the powers of the DMCA, the entire party wants to prevent Unix users from obtaining information.

    [/politics] [permanent link]

    18 Aug 2008

    FreeBSD 7 SATA Weirdness
    Over the weekend I installed the x86-64 build of FreeBSD 7 on my workstation, dib. I haven't had time yet to configure everything to my liking yet, but almost everything works.

    The one really annoying issue centers around a SATA DVD burner. When this device is attached to the primary SATA controller (ICH7), the system refuses to boot from the hard drive. It reports that no system disk has been found. I've tried all of the SATA settings options in the BIOS and none work.

    If I connect the SATA burner to the secondary Marvell "RAID" controller the system boots from the hard drive without issue. In Windows, this requires another driver (which for some reason installed a copy of apache along with it). Under FreeBSD 7; however, this second controller seems to be currently unsupported, leaving me with only the IDE burner available.

    I may spend the $20 and get another IDE burner and just forget about the SATA issue, but I really would like to know what the problem is. If any one has any idea why the system would fail to boot from a SATA hard drive when a SATA optical drive is attached, please email me and give me some insight into this issue. Maybe the Unix category wasn't the best for this. I spent more time discussing the hardware/BIOS weirdness than the installation or configuration of FreeBSD7. In fact, FreeBSD 7 isn't a very good title for this either. I'm going to change that.

    [/unix] [permanent link]

    15 Aug 2008

    A little less evil
    Another posting on Slashdot reports that YouTube (owned by Google) contacted the IOC concerning the take down notice recently filed. After being contacted, the IOC backed down. YouTube (owned by Google) restored the video.

    [/musings] [permanent link]

    12 Aug 2008

    Don't be evil?
    There's a story over on slashdot about the International Olympic Committee demanding YouTube (owned by Google) remove a video of a Free Tibet protest. Of course YouTube (owned by Google) removed the video immediately.

    The video of the protest was filmed in New York, because the protest was in New York near the Chinese Consulate. Last time I checked, which granted was a while ago, New York was in the United States. Also the last time I checked, we had the right to free speech in this country.

    Maybe I'm ignorant. Maybe I'm just dumb. To me, this sounds like the IOC and Google denying the protesters their freedom of speech.

    [/musings] [permanent link]

    Cuban Pete's
    Last night I went to dinner with some friends. After debating for a while, we finally decided on Cuban Pete's on Bloomfield Ave. in Montclair.

    We arrived and the restaurant was a little crowded, but the three of us were seated in the outdoor dining area rather quickly. The weather at the time was nice, with clear skies and a comfortable temperature in the mid- to upper-seventies; beautiful Autumn weather.

    We looked over the menus and made our decisions and then waited. And waited. And waited a little more. Eventually our waiter, Miguel, came over to the table and took our order. My one friend attempted to order the breaded steak. Miguel quickly said, "You don't want that. It's not very good." My friend took his advise and ordered something else instead. After Miguel took our order he quickly came back with our drinks.

    We then waited. And waited. And waited some more. After about 25 minutes, the tapas we had ordered as appetizers finally came out. We split orders of chicken empanadas, beef empanadas, fish fritatas, and goat cheese fritters. All of these were quite tasty in my opinion and only to make us hungrier. At this point we had arrived at the restaurant a little over an hour prior.

    As we waited for our entrees, the sun set and the air became rather cold for August. Eventually our food arrived. We were all very hungry at this point and starting to run short on time as well.

    The food was all quite good. One friend had a Cuban burger made from beef and pork served with potato sticks. He said he liked the burger a lot, but the roll left a lot to be desired. My other friend and I both ordered the marinated skirt steak. The steaks were served with rice, black beans, and fried plantains. All of the side dishes were good. I was less than thrilled with the plantains, but then again, I've never really liked plantains. My friend liked her plantains even less than I did. The steak was quite good and the best I've had in a very long time; however, it was the first steak I've had in several months.

    As we were finishing our meals, it began to rain. Apparently some clouds rolled in as the sun was setting. We quickly finished the last few bites and we ran inside. We got our bill from Miguel, paid, and headed back to the car while the rain was still just a drizzle.

    Overall, I enjoyed the evening. The food was good. Miguel was friendly. The service was a little slow. We were there for a good two hours, an hour and a half of that waiting for our meals. On yelp.com there's more details of other people's experiences at Cuban Pete's; a lot of them more opinionated than mine. Some people loved it, others hated it. I thought it was okay. I'd like to go there again, when I have three or four hours to sit and wait for food. I've heard good things about the paella there and I'd like to try it.

    [/musings] [permanent link]

    09 Aug 2008

    Revision Control
    One could argue that this should be filed under the Unix category, but this post is more about the album than it is about the Concurrent Versions System.

    Friday night I created a CVS repository on this server to manage album related files. After discussing it with rskutins, we agreed on several key points.

    First, with changes being made a little more frequently than before, it would be best to have some way to track what was going on, and to be able to roll back to a previous version if the changes don't quite work out. Second, we wanted to have a way to organize several files for each song, for instance, lyrics, notes, bass tabs, drum tabs, etc. Last, and maybe the most important reason for the reorganization, we wanted to move away from the numbering scheme that was in place. Each song was numbered from 0 to 17. This was fine until we realized 11 was likely to be the first track on the album.

    Now the album is stored in a CVS repository. This will keep a version history of each file, allow us to simultaneously work on parts of the album, and merge our changes.

    Within this repository we now have a tree structure where each song has its own directory. The directory will hold any and all files related to that song. In an effort to move away from the numbering scheme, an arbitrary naming convention was mutually agreed upon. The songs are now known by names such as Soundwave, Ravage, Frenzy, and Rumble.

    The album is starting to come together. I feel motivated to work on it and recently I've found myself inspired to write. Now if only I had time.

    Omlette listened to the Accidental Mix I posted (of the song now known as Soundwave) and gave me some feedback.

    It sounded ominous. I don't know how else to describe it since I'm not familiar w/ either artist. Oh wait. Were you mixing your own stuff?
    Ominous seems like it could be a good thing given the current direction of the album.

    If anyone else takes the time to listen to it, I'd appreciate any comments or suggestions. If you don't have it, my contact information is on this page.

    [/album] [permanent link]

    08 Aug 2008

    Another Demo Update
    Two weeks! Ha! It's been closer to two months.

    A few days ago I had some time so I sat down with the ProTools set up again. After considering some advice from jlight, I decided to record a second track of the bass line. I decided to use my Yamaha for the second track, as I had used my Fender for the original recording back in June. The two instruments have different characteristics in their sounds and the two playing together seems to add a "fullness" to the sound.

    So all I had to do was record 24 seconds of bass and put together a mix. This should take, what, 15 minutes? It took 45 just to record. Once again ProTools repeatedly crashed. When it wasn't crashing, it would report an error and stop recording. Does anyone know if there are updates for ProTools LE 7.1 that will fix this issue? As it stands now, I can't run ProTools for more than a few seconds without disabling multi-core support on my CPU. I have multiple processors. It is a multi-threaded application. It should run better... But I'll save this for that upcoming ProTools rant I keep promising.

    Anyway, after about an hour and fifteen minutes, I got two mixes complete. One of them was accidental and sounds, "interesting." The other is closer to what I had in mind. While I wait for feedback on the actual mix from certain people, everyone is free to enjoy the accidental mix found here.

    If anyone actually listens to it, I'd be happy to accept any comments and criticism.

    [/album] [permanent link]

    06 Aug 2008

    CS115
    A number of years ago, Stephen Bloom taught CS115 at Stevens Institute of Technology. Any one familiar with his teaching style is well aware of how "animated" he can be in class. In this particular course, one student made some recordings of the lectures.

    Copies circulated around campus, but over time these recordings became harder to find. In an effort to preserve a piece of history, I present to you The Bloom MP3s.

    [/musings] [permanent link]