Tuesday, August 30, 2011

The Art of Inkscape.

After talking about Inkscape yesterday I wanted to show a picture I'd created in it which I thought I'd posted at some point. A thorough search of the archives failed to turn it up, however, so perhaps it was one of my post ideas that never got used. I shall rectify that now, by presenting you with this picture I made using Inkscape:

Just so you know, I didn't create that from scratch; I based it off a real photograph I took, which you can see below. You can judge for yourself how well I did.
Plumeria flowers, the white-and-yellow kind.

Monday, August 29, 2011

Daniel's Software Musings (Part 3)

Once again I return, with more reviews of programs that may or may not knock your socks off and/or change your life. The ones I'm reviewing today, probably not. But they're still nice programs.


Creativity
Inkscape
You may not be aware of the fact, but there are actually two different ways to store graphical data digitally. One way is called raster graphics, which is probably what you are most familiar with since that's the kind of graphics that digital cameras put out and programs like the GIMP work with. It consists of storing an array of numbers that translate to colors to make a picture. It works great for photos, but has a few disadvantages such as the fact that you can only expand photos so much before the underlying graininess becomes apparent. The other way is known as Scalable Vector Graphics, or SVG for short. This involves storing a picture as an actual collection of shapes that are drawn at whatever resolution is required. If you draw a line in an SVG image, you can zoom into that line as much as you want and it will never appear blocky or pixelated. This makes SVG an obvious choice for  pictures that may need to be drawn or printed at many different sizes, such as logos. However, you can use SVG for much more than simple logos. You can create some fairly complicated pictures with a bit of work, and there are even comic strips on the Web drawn entirely in SVG. That's where Inkscape comes in. It offers a powerful interface for creating and editing SVG images. If you need to, you can even export your image as a PNG file (a raster graphic format). It also is capable of importing PDF files and creating SVG images from them, since they use a similar technology. All in all it's an excellent program for dashing off a simple logo, or laboring over a complicated masterpiece. I don't really have that much more to say about it, but I do have a picture I created using it that I'll be showing in an upcoming post.

Recreation
VLC Player
VLC Media Player is a simple little program that will play pretty much any video (or audio) format out there. It comes with its own codec pack so you never need to worry about having to download additional codecs. This is another program about which I have little to say, as it does its job and does it well. I don't actually watch videos much (and use Quod Libet for music) so I don't use it very frequently, but I've found it to be a very simple and workable program. It also has another function I just found out about recently: you can use it to convert audio/video files from one format to another. Very handy in an emergency situation when you need a file converted. It comes with a bunch of presets for the most common formats, but you can pick your own as well. This simple little tool makes a great addition to your digital workbench.

Miscellaneous
f.lux
If you, like me, use your computer after the sun sets (perhaps much later), you may want to check out f.lux. This interesting little program adjusts the color temperature of your screen according to the time of day. The idea behind it is that the light given off by computer screens mimics the light given off by the sun, which is fine during the day, but probably not something you really want at night. In fact, there's a growing body of research that indicates that too much light at night is detrimental to human health for a variety of reasons, such as interfering with normal melatonin production. Anyway, what f.lux does is adjust the color balance of your screen to be more red after the sun goes down. Since red light is less energetic than blue light, this should in theory help prevent some of the circadian rhythm disruption produced by being exposed to light late at night. How well does it work? Well, that's a good question. I didn't notice any dramatic changes in my sleep or sleep patterns after installing it, but then again, the changes it makes are rather subtle. I believe the principle behind it is sound, and I feel that the slightly redder screen at night is somewhat easier on the eyes, so I'm willing to continue using it. My advice? You may not see dramatic changes, but it can't hurt you, and may quite possibly be of benefit. It's easy to uninstall if you don't like it, at any rate.

Sunday, August 28, 2011

Daniel's Software Musings (Part 2)

Today in the second part of my software-review series I have another couple of programs for you to peruse and (hopefully) enjoy.


Creativity
Audacity
Audacity is an excellent sound editing program. That sounds trite, but there really isn't that much more I can say about it. It does sound editing, and it does it well. I don't do a lot of sound editing compared to, say, photo editing, but on the occasions I have I've found Audacity to be quite capable of what I needed it to do. One minor caveat: although Audacity can read MP3 files just fine, it cannot save your work as one without downloading a separate plugin (this has to do with software patents preventing the bundling of the pertinent code with Audacity, although the use of the plugin itself is completely legal). Thankfully the installation process is fairly simple, and there are full instructions for how to do it in the FAQ. And there's a good chance you will want to do it, given the ubiquity of MP3 files nowadays....

Productivity
TeXworks (\(\LaTeX\))
I know I've gushed before about how \(\LaTeX\) makes your documents look beautiful, but I just couldn't resist the chance to do it again. For those who don't know, \(\LaTeX\) (pronounced lay-tech, with a Greek chi (\(\chi\)) sound at the end if you want to be particular) is a sort of easier-to-use version of \(\TeX\). \(\TeX\) is a typesetting language invented by the brilliant computer scientist Donald Knuth himself, and TeXworks is a program that interprets documents written in \(\LaTeX\) format and outputs them as PDF documents. Like many of the programs I'll be listing, it requires an investment of time in order to use well, but the results are worth it. To be clear, TeXworks is but one of many \(\LaTeX\) editors out there, but it's a good one, and more importantly, it's free, unlike a lot of them. (To explain, \(\LaTeX\) is like HTML; it's a mark-up language that must be interpreted. TeXworks is to \(\LaTeX\) what your browser is to HTML.) There really is no better way to describe \(\LaTeX\) than that it takes what you type and makes it beautiful, leaving you free to concentrate on the substance rather than the style of what you're writing (unlike these posts, where I have to do a lot of manual HTML and CSS tweaking to get those fancy header effects). And it's not only math-heavy papers that benefit from it (although they do, tremendously). It's possible to display pretty much any symbol ever devised or invented by man using \(\LaTeX\). The intimidatingly-large document that lists every symbol supported includes everything from specialized phonetic symbols to musical notation to Egyptian hieroglyphics to pigpen-code fonts to chess notation to ancient alchemical symbols to Feynman diagram notation to the entirety of the still-undeciphered Minoan script Linear, A and B. And just in case that wasn't enough for you, there's a large section at the end detailing exactly how to go about defining and using your own symbols. And I haven't even mentioned one of the most amazing thing about \(\LaTeX\) that should appeal to everyone who's ever had to write a bibliography: \(\LaTeX\) can write it for you. You just put the information for your papers into a database (and many papers found online come with that information handily pre-generated), and \(\LaTeX\) can create a complete database out of it in many different standard formats using just two commands. It's that simple. If you foresee any large amounts of writing in your future, do yourself a favor and learn how \(\LaTeX\) can make life simpler (and more beautiful) for you.

Miscellaneous
WizMouse
Have you ever found yourself with two windows open, perhaps comparing or copying things between them, when all of a sudden you need to scroll the window that you aren't currently working in? I don't know about you, but that happens to me a lot (especially while using TeXworks), and I find the constant need to click over to the inactive window, scroll, then click back and re-locate my place in the first window again a pain. Wouldn't it be nice if you could just scroll the inactive window without having to click on it first? If you answered yes, well, then, rejoice! because WizMouse allows you to do just that. Honestly, this program does what Windows should be doing natively. You'll notice I specifically said Windows there, because both Macintosh and Linux do this already, and it's a real black mark for Microsoft that they haven't yet caught up to the 21st century. It's not difficult, as shown by the tiny size of the file necessary to do it. Some of you know me as a staunch anti-Apple person, but I will willingly concede that in this area Apple is way ahead of the makers of my favorite operating system. Anyway, the point is, this program fixes it. Get it. Unless you're not running Windows, of course.

And that's it for another episode! I don't know how, but I sit down to write one of these after supper and next thing I know it's the wee hours of the morning, so I hope you appreciate it. A hui hou!

Friday, August 26, 2011

Daniel's Software Musings (Part 1)

As you can see, it's been a few days since I said I would do some reviewing. When I wrote that, I conveniently managed to forget that I tend to put off doing reviews because the philosophical concentration required to achieve an Aristotelian level of understanding of the review subject's essence is somewhat taxing. But I didn't forget, and it's been nagging me for the past two days, so here's the first part of what will most likely be a multi-part series over time of various programs.

To start off, I'm going to review some programs that I use fairly frequently. I'll start of by mentioning that all of the programs I'll be reviewing are free; most free in the sense of “freedom to use for your own purposes” (which usually means open source), all free in the sense of “no cost”. Also, because of that, most of these programs will run on pretty much any operating system.

Creativity
Blender
Blender is a 3-dimensional modeling program that I've been using since the autumn of 2008. I've posted pictures made using it before, most recently here. It is a very powerful program, and as such has a learning curve that may charitably be described as “precipitous”. However, for the persevering, there are a lot of resources online detailing how to use it, ranging from tutorials for those who have never opened it before to discussions of many of the highly advanced features that are hidden within. Blender may not be quite on par with similar commercial products, but it is still an incredibly versatile and powerful program, and is a couple of thousand dollars cheaper to boot. If you're willing to put the time into learning it, you can produce some amazing stuff. In addition to still renders, it can also do animation.

The GIMP
The GIMP, or GNU Image Manipulation Program as the full unimaginative name goes, is an incredibly powerful application on par with the much costlier Photoshop in many ways. And the ways it isn't are ones that typically only the most advanced of users will notice. I use this program for all my picture editing needs (such as the many panoramas I make) because it can handle anything from the simplest of tasks to projects of extreme difficulty and complexity. For instance, the picture in this post was made entirely with GIMP. I used it to make a few modifications to the Blender logo picture seen above, in fact. Like any new program it will take you a while to get used to, but it definitely has an easier learning curve than Blender by virtue of the fact that you're usually working with pre-existing pictures instead of making them from scratch, and you can get your feet wet doing small modifications before jumping into the deep end of photo editing.

Productivity
Python
If you need a powerful, multi-purpose programming language that is also simple to learn, you need Python. This elegant language is easy to pick up (I've learned everything I know about it by consulting its thorough and well-organized help documents) and yet has a wide variety of standard commands that provide most of what you need right away (“batteries included” is a phrase often used by fans to describe it). And if that function you need doesn't happen to come with the download, chances are, unless it's an extremely uncommon or unusual function, that someone, somewhere, has already coded it up and made it available. Ultimately, Python provides a nice “first language” for beginners that can be explored and extended to match the user's growing skill. It's well summed up in the unofficial motto: “easy things should be easy, and hard things should be possible.”

Recreation
Quod Libet
Quod Libet is a very interesting little music organization and playback program that plays a variety of common formats. It comes with Ex Falsa, a bundle of code that organizes your music based on tags. Or, rather, it lets you organize your music the way you want to using tags. It had a definite learning curve to it, but I find it easy and enjoyable to use now. It lets you search your music based on any tags it has: name, composer, album, artist, etc. Like other such programs, you can organize your music into playlists, which it will play very well. And it has one real stand-out feature I haven't seen before: by right-clicking on the Play button while a song is playing you can tell Quod Libet to stop after that song, which turns out to be a surprisingly useful feature when you only want to listen to one song in a playlist. It's one of those didn't-know-you-needed-it-but-now-you-can't-live-without-it functions. (If you're wondering about the name, “quod libet” is a Latin phrase meaning reoughly “whatever you like” or “what you will.” It comes from a phrase in logic “ex falsa, quod libet”, which means “from a falsehood, whatever you want” referring to the fact that if you begin with a false premise you can logically prove any (incorrect) thing you want. The developers liked the idea of “whatever you want” to describe the organization capabilities of Quod Libet, hence the name.)

Keep watching in the future for more informative and hopefully interesting reviews! A hui hou!

Tuesday, August 23, 2011

What is a computer?

Today I decided to indulge in a little philosophical musing, on the question of what Aristotle would think of the personal computer (note that I'm talking about any computer owned by a person, regardless of operating system). In the Aristotelian tradition, a thing is defined teleologically by what its final aim or purpose is. So to Aristotle, the answer to the question “what is a frying pan?” would be something like “a device for cooking food, usually involving liquids.” From this, according to Aristotle, you could then derive many of the characteristics of a frying pan without ever needing to see one: it must be fireproof, non-porous, of such a shape that liquid does not spill out, etc. The details, such as whether it was made of metal or stone, would be of less concern to him. This sort of question works pretty well with many of the everyday devices we take for granted nowadays: a toaster toasts bread, a refrigerator keeps food cold, a washing machine cleans clothes with water, a dryer drys them with warm air, etc. etc.

But I suspect Aristotle would have a slightly harder time with a computer. Because just what is the final aim or purpose of a computer? Is is communication? Entertainment? A medium for creating art, or conducting business? A computer can be all of those things, but it is not limited to just one. Hence the difficulty.

(Actually, Aristotle would probably come up with some quirky, amusing definition of what a computer is. The guy had a pretty sophisticated sense of humor. In answer to the question “what is a human being?” he gave the tongue-in-cheek answer “a featherless biped,” and his definition of “nothing” was “what rocks dream about.”)

I think what a computer really represents, at its core, is potential. Given the right software (and in some cases, various peripherals such as a printer) a computer can be used to do an extremely large number of things. For instance, in between writing the previous sentence and this one I had a sudden urge to see a list of all the words I've used in this post ranked in decreasing order by length, so I took 20 minutes and wrote a short function in Python that would do that for me. I didn't have that in mind when I began this post, but it illustrates my point about the versatility of the computer rather well.

Now, while musing on what Aristotle would think of the computer is amusing, I'd like this chain of thought to go somewhere useful, so over the next few days I'm going to offer up various pieces of software for increasing your computer's potential. I have a lot of varied interests and a powerful computer to experiment with, so I've collected quite a few good programs over the years that I use in a myriad different ways.  So, until next time, a hui hou!

Monday, August 22, 2011

A Book, a Book, my Kingdom for a Book!

Why is it that textbooks for the lowest level classes tend to cost more than those for higher-level classes? Here I am with only two classes this semester, one of which is a lab that has no book required, and I naïvely thought that I'd be able to save some money on books. Hah! For my Anthropology 121 class I have two books that are at least strongly recommended, one of which costs $72, and the other $128. I mean, my upper-level advanced physics books usually cost less than that. Is this some sort of pecuniary test to weed out those financially incapable of paying early on? (Oh, wait, maybe it's just a way to promote student debt from an early age.)

All that aside, it looks as if I'll be enjoying my classes this semester. My Anthropology class is Introduction to Language, and looks to be quite fascinating. And my lab is the Observational Astronomy lab, taught by the new director of the 0.9-meter Hōkū Keʻa telescope for students, so we'll get to visit that at some point. The second half of the semester will be mostly taken up by us learning how to go through an observation run from initial proposal to final data analysis, so that should be interesting and informative as well. All in all it looks to be a fairly easy final semester for me, a welcome change from last semester.

Thursday, August 18, 2011

Fun with Calculus and Airplane Baggage Fees

Today I thought I'd do a little mathematical analysis of Hawaiian Air's luggage handling fee scheme using some simple calculus. Hey, wait, keep reading! I promise I'll try to keep it interesting, and the formulae to a minimum.

I don't remember when I first started wondering about the luggage fee scale used by Hawaiian Air, but it was probably the first time I was checking my own bags in and discovered that the fees go up – way up – upon checking more than one or two bags. But they didn't vary in any sort of predictable way that I could see, so I took the liberty of plotting them out, as you can see below:
Checking one bag with Hawaiian Air will set you back a reasonable $25; two bags, $60; three, and it jumps to $185; four, five, six, and seven will set you back $310, $435, $560, and $760, respectively; and 8 bags will leave your wallet lighter to the tune of $960. Now as you can see from the graph, the amount that it goes up is not uniform. To analyze how it changes, we can look at the slope. Because there are only a small number of points, we can easily calculate the slope between each one, which is equivalent in calculus to taking the first derivative. Taking the slopes using the simple equation s = (y2-y1)/(x2-x1) (I was lazy and wrote a quick routine in Python to do it for me) gives us $25/bag for the first bag, $35/bag for the second one, $125/bag for the third, fourth, and fifth ones, and $200/bag for the seventh and eighth.

Now, while this tells us how fast the fee is changing per bag, we can get more information out of it by taking a second derivative and find out how fast the rate of change is itself changing. For example, it looks on the graph like the biggest jump in terms of absolute price is between the second and third bag, and if we take the  second derivative (essentially taking the slope of the points formed by taking the first derivative) we see that this is indeed the case. Taking the second derivative, we see that the price increase, er, increases, by $10 dollars for the second bag ($35 instead of $25), $90 for the third bag, 0 for the fourth, fifth and sixth ones, $75 for the seventh, and 0 for the eighth again. Minima and maxima (the largest and smallest values) of the second derivative tell us exactly where the function is changing its value most rapidly, so we can see that the biggest change is between two and three bags.

So what's the lesson we get from all this? First, calculus isn't very difficult, and knowing it can enrich your life in many unexpected ways. In fact, calculus is like a fruit tree; you spend time planting it, watering it, and nurturing it, and in return it continues to delight you with delicious fruit long into the future. In many ways I think calculus is simpler than algebra, trigonometry, or geometry, yet so many people are afraid to try it because of preconceived notions about their mathematical ability. To put it another way, calculus is like color vision; neither is essential to life, yet lack of either leaves the world a drab and dreary place.

Secondly, try to avoid taking three bags on Hawaiian Air if you can, it just gives you the worst bang for your buck, so to speak. Stick with two, or one if possible.

Sunday, August 14, 2011

Ah, the lovely rain of Hilo.

You ever get up in the morning, and get a poem stuck in your head? As I went to clean up in the kitchen after breakfast this morning it was raining, and the thought "Ah, the lovely rain of Hilo!" came into my head. After that, the poem pretty much wrote itself. It's trochaic tetrameter catalectic, I think

Ah, The Lovely Rain Of Hilo
by Daniel Berke 

Ah, the lovely rain of Hilo,
Lightly falling from on high,
Gently dancing in the streets, oh!
How I've missed you, cloudy sky.

Languidly it pelts the houses,
Roadways, people, cars, and plants,
All about it gently douses,
In its merry, liquid, dance.

Lift thine eyes up to the mountains,
Further still, the clouds espy,
Raining dew from heaven's fountains,
Blessings from the One on High.

Saturday, August 13, 2011

Rejoice with me, for my lost T-shirt has been found!

I realize I've been pretty quiet lately, but I had a good reason this last week: I'm flying back to Hawai‘i today, and I wanted to spend as much time as I could with my family before I left.

Also, just yesterday I was able to find my favorite Periodic Table of the Elements T-shirt that had been lost for over a year. Hooray!

Edit: And, in case you were wondering, I made it back to Hilo in one piece. I'd forgotten just how much I like the weather here.

Saturday, August 6, 2011

Globular Cluster Photo Series (Part 9): M15

Today I have a picture of the globular cluster Messier 15 for you to enjoy. M15 is a large cluster at approximately 170 light years across. It appears about two-thirds the size of the full Moon on the sky (18.0 arcminutes), and would appear larger were it not for the fact that it is nearly 33,600 light years away (or about as far from us as we are from the galactic core).

Messier 15 in Pegasus.
M15 is one of the most densely packed globular clusters in the Milky Way, due to its core having undergone something called "core collapse". This is a simple process whereby kinetic energy is transferred from the stars in the core to the stars on the periphery, causing the outer layers to "puff up" while the stars in the center contract and pull in closer to each other. M15 has over a hundred thousand stars, though, so there are plenty to go around.

In fact, that enormous number of stars includes some interesting things, including 112 variable stars, 8 pulsars, and a planetary nebula. This was the first planetary nebula (which have nothing to do with planets besides appearance in small instruments) found in a globular cluster, and one of only four located in globular clusters found to this point. It is also thought that there may be a massive black hole in the center of this cluster. So all in all, a bit more interesting than some of the clusters I've focused on recently.