Friday, August 17, 2012

Output > Input (Progress)

I titled this post the way I did to reflect on the imbalance between what I create and what I receive.

MuPuPriNT is perhaps what one might call my "flagship" application - it is, after all, the biggest and most feature-rich. It currently allows both Windows and Mac users to test 4 different types of numbers - Proth, Cullen, Woodall, and Pythagorean - as well as any random number of their choosing. The Mac version (which is faster, more modern, and more efficient) even allows you to post to Twitter!

If enough people tell me they wish to be able to test other kinds of potential primes, I will certainly consider implementing other testing applications in the future. As of now, however, MuPuPriNT (and NullCoding projects in general) have received limited feedback and, indeed, equally or more greatly limited attention.

I consistently ask for feedback, even from those not at all interested in number theory. Please remember that these programs are not and likely never will be reputable or irrefutable tests of integer primality.

In fact, the only reason I write these programs at all is due to the way in which I learn. I am a completely self-taught programmer. I am a computer technician and technical consultant by trade, and I study Chinese language, history, and culture at a small liberal-arts college. Although there is certainly overlap between my job and my pursuit of programming, it is not a requirement for me to do my job well and certainly not anything related to my field of study.

But the way I learn is different from the way most people learn. I learn by doing, and I'm simply more motivated to do stuff if it has to do with something I like. Thus, if I wanted to learn a programming language, I would:
  • Gather the basics - IDE, documentation, tutorials, books, and the like
  • Obtain a basic understanding of what the language can do
  • Think of something in which I'm interested
  • Determine if I can write a program, no matter how simple, along those lines
Because of my growing interest in number theory, and my history of participation in PrimeGrid, I decided back around February or March to have my partner help me write a Proth number testing application. GJSieve 0.1 was born.

I became so intent on improving it, adding things here and there, that I sometimes found myself sitting in a lecture class with half my mind on the notes I should have been taking and the rest of my focus on the code I was editing on my laptop! Although my partner wrote most (if not all) of the first version, I added much of the functionality myself, such as file writing and looping.

I also wrote early versions of GJSieveC and GJSieveW myself, as well as the first few (pre-GMP/MPIR) versions of  IsItPrime? by myself, although admittedly their functionality was based directly on implementations used in GJSieve (Proth).

If that was all too involved for you, all you need to know is that I write prime-number testing applications because - if anything - I'm simply inexperienced.

I am an artist - a photographer and musician - so creativity is certainly not the problem. I can definitely think of applications I'd like to write that currently don't exist (that I know of!) - this is not the issue. The issue is that I would not have the slightest clue how to go about actually doing that.

Most programmers are just that - programmers. I am far too many things to make programming the central part of my life, and even if I did want to do that, I simply don't know enough just yet to actually begin developing, testing, building, re-testing, deploying, and supporting a serious application meant for large-scale distribution.

More bulleted lists! My knowledge includes:
  • C
  • C++ / Visual C++
  • Objective-C
  • Win32 API
  • Cocoa
  • limited Java
  • limited C#
  • Using Visual Studio 2010
  • Using XCode 3.x
  • limited knowledge of  Using XCode 4.x 
Most programmers have one or a few languages in which they specialize whilst knowing at least a passable amount of many others - at least to the point where they don't need to consult some kind of reference material every other line of code!

I'm certainly at a point where I can consider myself fairly well-versed in C-based languages, since I do have about a month of teaching myself for at least 6 hours a day, sometimes more. My self-teaching is essentially just writing applications, but it's very involved.

If I need to make something do something, I learn about how that piece of code works, not just how to do it.

For instance, if I need to write to a file, I don't just look for the commands and type them in. Rather, I learn about the FILE* type in C and what fprintf() does, and how to set a filename programatically, and so on - all of which are implemented in GJSieve and MuPuPriNT for Windows.

When I decided to port GJSieve to Mac, I realized Visual C++ would obviously not work and looked into using Objective-C instead. I instantly loved its simplicity and ease-of-use coupled with the fact I didn't have to use some kind of automagic IDE.

Within a few days, I had learned enough to:
  • build and compile a dynamic library from command line
  • link the dylib to my project
  • implement classes and interfaces through objects
  • make buttons and text fields work
  • save everything to a file in a directory the program makes
  • properly allocate memory the whole way through
And thus we have Mac versions of GJSieve and MuPuPriNT.

--

Throughout this post, I've basically been bragging. Cool. I do that. I prefer to call it "being proud of my accomplishments" or, better yet, "You'd talk about yourself a lot too if you put your mind to something and did it and it worked and you saw your efforts pay off and it made you happy!"

But I recognize that people, in general, will ultimately pay little attention to what my future father-in-law calls "toy programs." He's kind of tactless and a bit too blunt sometimes (oh please, so am I), but he's totally correct - my programs are not impressive on a grand scale, nor do they have any real practical application.

That won't stop me from writing them, though! Hey, I think it's fun! :)

No comments:

Post a Comment