The Artful Scientist

Communicating the greatest possible growth

  • Google Talk

  • Skype Me

    My status
  • Where are you?

    Welcome to theartfulscientist. Enjoy your stay as I talk about my life as a fire protection engineering student and one who studies fire dynamics. These posts range from day to day excitement to my developmental life and provide a window into my world.



    The about page tells more.
  • Photo Albums

  • Want to read what I read?

    Visit my Google Reader shared items page. You can even subscribe to my favorite shared articles.
  • My Music Plays


  • My Visited US States

    Visited US States


    • Subscribe

        RSS Subscribe

      or subscribe to updates by email:

    • Search This Blog

    • Archives

    •  

      November 2008
      M T W T F S S
      « Oct    
       12
      3456789
      10111213141516
      17181920212223
      24252627282930

    Archive for the 'Computing' Category


    On equal access to knowledge for all… on net neutrality

    Posted by Kris on 20th April 2008

    Some of my friends and colleagues may have heard me go on a rant or two about net neutrality or equal information access. Hopefully this post will describe my stance a bit better. Those who know me know that I stand strong for open knowledge and easily accessible information for all of us in the world. This includes upholding open document standards and the opposition of tiered-internet infrastructures. But most people that use computers these days, I am afraid, don’t think or feel that these ideals will affect their day-to-day computer usage that they partake in.

    Well, I happen to think that it not only affects your daily pursuit of knowledge and you work in whatever field you are in, but it also greatly affects the way we work together as a society, create and bring new ideas into fruition, and nurture successful generations to follow.

    Last Thursday, the FCC held a public hearing on net neutrality. 5 commissioners from the FCC joined and heard from leading public scientists, network operators, and entrepreneurs. 2 commissioners were in support of network neutrality, 2 against, and one neutral (pun intended). Also, Comcast and many other carriers were invited to the hearing; however, they declined.

    Here is the video from the hearing as well as other snippets on the topic:

    You need to a flashplayer enabled browser to view this YouTube video

    Jason Devitt, CEO of Skydeck, testifies at the FCC Hearing
    You need to a flashplayer enabled browser to view this YouTube video

    Law Professor Lawrence Lessig on Net Neutrality and the Rise of Google
    You need to a flashplayer enabled browser to view this YouTube video

    From Barack Obama’s address at Google
    You need to a flashplayer enabled browser to view this YouTube video

    You’ll notice I stuck a button on the right of my site in support of net neutrality. I’ll be calling my senator and representatives on Monday morning to let them know of my support of net neutrality and a new Act working its way through the House of Representatives. I urge you to do the same. It is critical to recognize that issues such as Verizon winning the FCC spectrum auction to Microsoft’s OOXML as a international standard to Comcast breaking fundamental ethical and technical ways of the internet are of utmost importance to our current age, culture, and political era.

    In the end, regardless of the specific topic at hand, be cognizant of those trying to disrupt and block the progressive movement that is before us. Especially when it involves profit rather than progress. Especially when that blocking impedes our societal learning, sharing, innovation, creativity, and global and equal access to information for all.

    Posted in Computing, Learning, Passion, People, Productivity, School, Science, Teaching | No Comments »

    Apartment fires burn and homes are lost due to outdated modes of thought

    Posted by Kris on 15th April 2008

    [Used from KPRC video click2houston.com]

    Fire. It’s what I do. And I happen to subscribe to Google News alerts that have “Houston Fire” in the title. Helps me keep in touch with the fire. It also helpingly disturbs me as to what actually goes on outside of the classroom. Really, it’s quite a good way to keep yourself thinking and valuable if you are stuck with that stagnant smell of your job or classes.

    Lots of fires happen everyday. Apartment fires always happen. A lot. Three apartment complexes burned to the ground within 48 hours over the past weekend. And then some. This is what I see:

    Residents Say They Heard Gunshots Before 3-Alarm Fire

    Blaze damages second apartment complex in 24 hours

    Fire erupts at SW Houston apartments

    Apartment Blaze Damages At Least 16 Units

    Apartment fire sends 5 to Hospital

    Yes, those are the most recent stories in my warm and cozy feed reader.

    When is legislation going to get off of its ass and move at the pace that the rest of us do? When is enforcement going to follow? Sure, I guess we all are biased to the field that we are in and think that it is the most important thing in the world. But seriously, people are dying and losing their homes in the midst of an ocean of politics and code books wasting valuable daylight.

    Southeast Houston Apartment Fire

    [Picture used from myFoxHouston.com]

    A lot of the time, I am an optimist. I see what change has followed the positive move of a community-based and collaborative internet (see video in previous post) in other industries. And then I imagine progress and change happening in our daily lives. I dream of governmental processes being way more open and community-driven than we are used to. I can watch it in real-time, play-by-play happening with larger corporations - as they break down due to the epidemic spread of knowledge and awareness. And I imagine a world where fire sprinklers (technology that has been around for 130 years) and other fire safety systems make fire protection engineers obsolete before my industry has even had a chance to get popular and prestigious.

    I suppose what I am saying is that I toil my soul, expand my brain, and work every breathing moment that I can, day-by-day on prediction of fire, contribution to the robust knowledge that we have on fire/combustion, and working using my technical skills. All of this to allow fire documentation, analytical and numerical tools, and scientific information to be available to all people around the world: engineers, scientists, students, and so on. Why? I’d say, in this century and society, I do it to contribute. And I think if just a few other key people did the same, our fire, death, and loss of home problems would vanish at amazing and mind-blowing speeds.

    P.S. This thought process isn’t just limited to my field of fire science, but I write about it because it is what I do. Think about your field for a second. Finance, safety, technology, whatever it is. Mentally apply success to the field by working on and tweaking the top 3% of the people, systems, or methods that are in use now. Realize that these top 3% are there due mainly to tradition, and did not get there due to community-driven work.

    Keep working at it. Align your work with your values. The change will happen. I’ll be waiting.

    Posted in Community, Computing, FDS, Fire, Goals, Health, Intention, Passion, People, Productivity, Resources, Science | No Comments »

    The Golden Resource List for Python Beginners

    Posted by Kris on 17th March 2008

    After years of being a master-of-none with programming languages, I have finally settled on one to delve deeper into: Python. I’ve been learning Python for about a month now, and it has been quite pleasurable. Although the language has been around since 1991, it has been gaining in popularity in the recent years and is used in many underlying projects at Google, Youtube, NASA, Honeywell, and the University of Maryland to name a few. It is an excellent language for a programmer of any level to pick up, and I chose it because of its versatility, clear syntax, and ease of use for transforming my ideas into a a functional and high level language.

    Along the way during the past month, I have sifted through hundreds of websites and quite a few beginner books. So here, I would like to share the links that I found most helpful in my quest for Python knowledge. As far as my past experience, I’ve dabbled in many other languages such as MATLAB, HTML, Fortran, C++, Java, Perl, and so on but never really grew to master a single one or use it in my daily life.

    So, without further delay, on to the list:

    Before You Start With Python

    1. Python.org - I couldn’t make this list without including the main Python site. There is just a great amount of information there. Plus everything I link to can probably be found there, but my list is only those resources that really helped me along in my learning experience.
    2. Teach Yourself Programming in Ten Years - Article by the director of research at Google - A great overview of programming and learning to program, all the while avoiding the ides presented by the “Learn to program in X days” books.

    Excellent Python Tutorials

    1. Dive Into Python - This is one of the first tutorials that I read about Python, and it gave me an excellent overview of the language. It really broke down the code line-by-line, but it still reads like a mix between a reference guide, a cookbook, and a tutorial. It’s a freely available book and should definitely be within quick reach as you learn Python.
    2. How to Think Like a Computer Scientist - This is by far my favorite tutorial in the entire list. I like this (freely available) book because of its plentiful and challenging exercises! I am usually picky when choosing textbooks on a new subject, and I will almost always get the book that has the most examples in it. I spent most of my time creating my own programs at the end of each chapter, and really got a feel for the language (and a nice sense of accomplishment!) at the end of each chapter. Highly recommended.
    3. Python Videos at ShowMeDo - There are over 100 videos at the time of this posting over a wide range of topics. Anything from how to open a Python session to namespaces and more. It was nice when starting out to just sit and watch someone who knew what they were doing do routine tasks, and it helped to ground basic concepts before jumping in on my own. Don’t forget to thank the creators of the videos with a comment!
    4. Learning to Program - This is one that I am going through last, because it gets into a bit more in depth discussion about basic and moderate topics. Very thorough.

    Beginner Exercises and Projects

    1. How to Think Like a Computer Scientist - I just HAD to list this again, because it goes at just the right pace and the exercises are well thought out. I am convinced that I really learned about 80% of my Python basics here when I put them to practice. Learn by doing!
    2. Projects for the Beginner - Python - This is a thread on a forum with over 100 ideas for programs. Use this when you are low on inspiration but high on ambition!
    3. Python Challenge - Neat implementation of puzzles that can be solved with Python scripts. They get harder as you progress levels. You might want to hit up the Python Challenge after getting a good hold on the basics and after you have many of these other links open in other tabs. :)
    4. Useless Python Challenges - This site should be visited after you have finished all of the trivial Python exercises and projects. When you are self-sustaining on the language and eagerly looking for some projects to do, but are hitting a writer’s block for programs, go here.

    Beginner Forums and Lists

    1. Python Forum - Beginners - Not a very high traffic forum, but they have a beginners subforum with 15-30 posts per day, just enough to keep you busy. I find it helpful to attack the problems that other beginners are facing. And if you come up with a good solution, post it and help others while you learn. Everyone wins!
    2. Learning Python Blog - One of the few “learning only” Python blogs. It is always good to see information shared from others while they learn. Sort of like this list. :)
    3. Python Tutor Mailing List - I only recently signed up for this, but I must say that there are some very knowledgeable and helpful people on here and it keeps the Python information coming at you via email. Seems to be quite a few students on here and you will most certainly learn something with each email thread.

    Interesting Python Projects and Libraries

    1. Django Project
    2. TurboGears
    3. Google GData Python API - This is an amazing API from Google that allows you to interact with Google Calendar, Docs, Maps, Youtube, Notebook, and so on. It is very easy to install and use and I look forward to developing with this in the near future.
    4. wxPython - GUI toolkit for interface development. I haven’t gotten to GUIs yet, but everywhere I turn I see references to wxPython.
    5. matplotlib - 2D plotting library that produces very nice looking graphs. Supports many, many types of graphs and is very customizable.
    6. SciPy - A collection of Python tools and modules for use in science, engineering, and mathematics. This is the light at the end of the tunnel for me and I hope to get more involved with this library as I progress with my Python learning.

    Editing Tools and Shells

    1. iPython - An enhanced Python shell that seems geared towards science, engineering, and high performance computing.
    2. TextMate (Mac OS X) - This is such an amazing editor that I must list it here. I didn’t use it at all before I started with Python, and now I simply cannot go without it. I had previously heard it described by programmers as a magical tool, but I had no idea. It does autocompletion based on previous words, syntax highlighting for a ton of languages, has a quick and easy-to-read method to execute Python scripts. It is perhaps the only non-free item in my list, but very much worth it!
    3. TextWrangler (Mac OS X) - This is what I used for a couple of years… until I discovered the greatness of TextMate a few weeks ago. TextWrangler is free though if you wish to use it.

    Other Resources (References, Packages, Hosting)

    1. Python Library Reference - Huge list of explanations about Python’s Standard Library. Made to help you discover the power of Python in your everyday programming.
    2. Python Webhosting - List of webhosts that offer Python solutions on their webhost. Python can be run on most hosts via CGI, but these wiki pages explain exactly how they implement Python usability. Plus I found out about the cool idea of HCoop cooperative web hosting through this list; this is the host on which you are reading this blog. :)
    3. Python Package Index - Directory of Python packages that you can learn about, download, and use in your own programming. Don’t reinvent the wheel!
    4. Python Cookbook Code Samples - This is a directory in the same vein as the previous listing, but the solutions to problems are presented as code with user comments. As of now there are over 2000 recipes.
    5. The Daily Python URL - Just as it sounds. News about Python in compact form.

    Again, while there are many, many other resources for learning Python, this is a list of my personal favorites. These are the specific sites that have been very helpful and impacting on my venture to learn Python. So while I may not have listed a particular item - I probably saw it, but didn’t get much from it at this time.

    Finally, you must forgive me if I got some detail wrong. I am learning, after all! Hopefully this list will help new and moderate Python users to utilize some of the best (and free!) Python resources that others have put up for all to learn from. Thanks to those people who shared their knowledge. And have fun with Python!

    Posted in Computing, Learning, Productivity, Programming, Python, Resources, Teaching | 2 Comments »

    How to install PyObjC, pygame, and gasp on Mac OS X for Python tutorial

    Posted by Kris on 16th March 2008

    I am going through the Python tutorial “How to Think Like a Computer Scientist” right now, and it is an excellent source for beginner/intermediate Python hands-on learning.

    http://openbookproject.net/thinkCSpy/

    However, when I got to chapter 8, my fun stopped right away. The author refers to a Python library called GASP (Graphics API for Students of Python) and gives an example and case study of a small game. The thing is, he doesn’t tell you how to install the module and it abruptly interrupts your lovely Python learning experience.

    http://openbookproject.net/thinkCSpy/ch08.xhtml

    I tried to use easy_install to install most of these, and it always ended up failing for some reason or another.

    As I am using Mac OS X Leopard, I will provide the missing instructions for how to get the gasp module installed (and its dependencies) for anyone else who runs into this situation:

    How to install PyObjC, pygame, and gasp on Mac OS X

    1. I assume that you have already installed some version of Python; I am using Universal Python 2.5 from http://www.pythonmac.org/packages/ which is a nice, easy-to-install package and has other prebuilt packages like numpy, wxPython, matplotlib, etc. ready to be installed. You can see other ways to get Python on your Mac at http://wiki.python.org/moin/MacPython/PythonDistributionsForMac
    2. You will need to install PyObjC, which is also available as a package from http://www.pythonmac.org/packages/ under the 2.5 link.
    3. Now, you will install pygame from a package (pygame-1.8.0rc4-py2.5-macosx10.4.mpkg.zip) available at http://rene.f0o.com/~rene/stuff/macosx/. This is linked from http://www.pygame.org/download.shtml
    4. Finally, we get to the part of installing gasp, which is confusing to find in itself. The FAQ page is at https://answers.launchpad.net/gasp-code/+faq/42 but the link to download is wrong. Get it from https://launchpad.net/gasp-code/+download. You will want to download the Code Release which is currently called python-gasp-0.1.1.tar.bz2.
    5. Extract the bz2 file and there will be a folder inside called gasp. Copy this folder to the /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/ directory and you will be in business!

      This is the command that I used: sudo cp -R ~/Desktop/python-gasp-0.1.1/gasp/ /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/gasp

    6. Open a python session and type import pygame and import gasp to make sure that they are installed correctly.
    7. Carry on with the great tutorial linked above!

    I found it odd that the beginners tutorial left out all of this information. Hopefully this will save someone the two days that it took me to find all of these links, packages, and methods.

    Posted in Computing, Productivity, Programming, Python | 4 Comments »

    Mac-Corrected Numerical Analysis Fortran Programs

    Posted by Kris on 10th March 2008

    I am taking a numerical methods course and using the textbook Numerical Analysis 8th edition by Burden and Faires:

    Numerical Analysis

    The book is good and has nice pseudocode examples throughout. It also has a companion website with all of the algorithms programmed in C, FORTRAN, Pascal, Maple, MATLAB, and Mathematica. For our assignments, we can use any program that we want, and I have been using MATLAB, FORTRAN, and Python as those make the most sense to me thus far in my computing experiences and are the most useful for my work.

    However, the FORTRAN 77 programs on the website are programmed in such a way that they only work when using a FORTRAN compiler in Windows. At this time, my primary machine is an Apple Macbook Pro laptop, and I am using the Intel Fortran Compiler version 10.1 on OS X Leopard. When I try to compile the programs from the textbook website, I get errors. So, I went ahead and fixed the files so that they would work on with the Intel compiler on the Mac, and hopefully Linux as well.

    The two problems were that:

    a) The programs were trying to read and write to ‘CON’, which is a Windows specific way of writing to the command window console.

    b) The programs had an extra line at the end and would crash the Intel compiler.

    So, I fixed these errors in all of the programs and you can download the corrected files in .zip format from me and follow the instructions below to compile.

    The original files are freely available from the author’s website here

    Step 1: Download the above linked zip file of the corrected FORTRAN 77 programs

    Step 2: Unzip the FORTRAN files. You will find several files with the .FOR extension.

    Step 3: Run the Intel FORTRAN compiler using the command: ifort -f77rtl -o <outputname> inputfilename.
    For example, to compile example 12.1: ifort -f77rtl -o alg121 ALG121.FOR.

    Step 4: Make the output file executable with: chmod +x alg121

    Step 5: Run the file with ./alg121

    Step 6: Be sure to answer the first Y/N question with the y or n character in quotes, such as “y” or “n”

    Step 7: Have fun learning numerical methods and dissecting the FORTRAN programs!

    Posted in Computing, FORTRAN, Math, Productivity, Programming, School | No Comments »