Forgot your password?
typodupeerror
User Journal

Journal: What is "hard" ?

Journal by AceJohnny

What are the qualities of a given task that make it "hard" ? Why are some tasks hard for some people, easy for others?

I propose that a "hard" task is one where I will have to overcome discouragement more. A hard task will require more motivation. The difficulties to be overcome include boredom, physical tiredness, and indecision, and self-doubt.

It is easy for me to write code. It is so difficult for me to seek a new job that I haven't done it in two years.

(post to be fleshed out)

User Journal

Journal: Similar interests or behaviours, and biking in the snow

Journal by AceJohnny

There's been a lot of snow in the town I live in, more than I've ever seen since I live here. I still go to work by bike.

I've noticed something: the most difficult place to bike on is where other people have left tracks before. The bike slips and shifts within the other tracks as I move through them, and I can't seem to properly follow exactly another track. The small differences in movement in direction make it a much more difficult and bumpy ride than if I were to bike through virgin snow.

I've noticed that when people have similar interests or behaviours, the small differences between them can cause a great deal of friction. It's not "how much we have in common" but, "how much is different".

Do you see the link between the two?

User Journal

Journal: The Wise Man on the Mountain (on teaching)

Journal by AceJohnny

(quickly whipped up metaphor on the difficulty of teaching)

There once was a wise man who lived at the top of a mountain. He knew a Great Truth, that was bestowed upon him by Greater Powers. He would freely provide this Great Truth to anyone who sought him.

Pilgrims regularly came to him, seeking to learn some truths, and he would bestow his Great Truth to them. He would tell them: "Mass is Energy!". But the pilgrims would not understand him. They would think "wood which is mass can be burnt to give off heat, which is energy, that is what he meant!" or "energy of some mass is related to the square of the speed of the mass, but mass itself is not energy!". In the end, they thought him crazy.

One day, a man named Albert heard the old man's Great Truth, and worked on it for years and years. One day, after some of his hair had become white, he said "E=mc2!", and understood what the old man meant when he said "Mass is Energy!".

It had taken a very special man to start from what he knew to the understand the Great Truth, but it was not the wise man on the mountain. The wise man on the mountain could not bring pilgrims up to his great truth.

The role of a teacher is not to bestow Great Truths to his students, it is to bring those students to see those Great Truths by themselves. Only then will they understand.

Biotech

Journal: Aging, synthesizing, simplification

Journal by AceJohnny

Lots of old respectable people seem to go on wild tangents. See: Tipler, Freeman Dyson, Linus Pauling.

As we age and learn, our brain culls unneeded neural connections. This is a natural and required process. Too many neural connections have been correlated to neural pathologies (autism?).

I wonder if too *much* culling makes people oversimplify their understanding of things, as their brain tries to fit new situations into their existing schemas?

Programming

Journal: Indirection

Journal by AceJohnny

Each level of indirection added to a program makes it more generic, but also makes it twice as complicated to understand.

Make it too generic, and nobody will understand it.

User Journal

Journal: Android (this is not the Linux you are looking for)

Journal by AceJohnny

There's a lot of excitement around Android. It is often mentioned that Android is a linux-based stack.

That is correct. What I tend to infer from it is not. When I hear "linux-based", I naturally think of all the ecosystem around it (this is something Stallman has been fighting against with the term "GNU/Linux"). In this case, it is quite specifically Linux-based as opposed to GNU/Linux-based, because nothing in the Android software stack comes from GNU.

Not the libc. Not the graphical system, though it's based on the framebuffer. Hell, even its Java isn't standard, in the sense that it doesn't have the standard Java Class Library (not even the CLDC/MIDP subset).

Porting anything to Android from a traditional linux system is a big undertaking, akin to porting a Windows or Mac app to Linux, or vice-versa.

Linux is cool for Android because it's GPL2, not v3, so manufacturers and vendors can lock it down TiVo-style. Had Linux been GPLv3, Google would have shopped for a kernel elsewhere.

I think Android is a cool undertaking and a step in the right direction of openness, but OpenMoko, Moblin, Maemo it ain't.

User Journal

Journal: Emacs

Journal by AceJohnny

Like thousands of geeks before me, I'm learning to use emacs. It is an extremely powerful editor. I've been using other, easier editors previously. There are a couple I like, notably notepad++ on windows, and kate on linux.
Though I am impressed by all that emacs can do and its custumizability, there is one thing I hate: it's user interface.

Emacs was first created by a bunch of geeks (some long-forgotten dudes like a certain Richard M. Stallman), working on powerful mainframes (not exactly, but stay with me here). This was before I was even born.

There computers were quite different in usage from what we have today. There were no user interface guidelines set in stone.

Since then, there has been stuff like IBM's CUA (Common User Access), or Apple's HIG (Human Interface Guidelines).

Emacs does not follow them.

Emacs calls "windows" what we now call "frames". And vice-versa. A "selection" in text is a "region". "cutting" is called "killing". "paste"? "Yank". There's this notion of "buffers", where everybody now has "open files" (What is it? "buffers" aren't necessarily "files"? Well it's close enough!).
Wanna close a file? Woops, ctrl-w just "killed" (cut) your selection. Wanna ctrl-x a piece of text? Woops, that's the all-important primary shortcut.

Honestly, Emacs has all the features a modern editor provides, and enough extra to cure cancer. However, it could use a much-needed update to it's UI terms and shortcuts. It's not impossible, most of its features map cleanly to what exists elsewhere, under another name (as mentioned previously).

It would open emacs up to a million young motivated geeks. Let the old geezers die off.

</rant>

User Journal

Journal: Moral evolution of our reaction to violence 1

Journal by AceJohnny

There are three stages in the reaction to violence:
1) "Strike your enemy seven times as hard as he strikes you." The basic idea is to discourage violence by warning you that the revenge will be much worse. It has the huge flaw of encouraging violence escalation, and turning a percieved slight into a full-scale war (as illustrated in this text).
2) "An eye for an eye" (Code of Hammurabi, Law of Talion) This tries to fix the escalation of violence. Problem is, we humans are imperfect, and will perceive intent where there was none, and easily fall back to the vendetta stage.
3) "Turn the other cheek" (Jesus, Gandhi) This tries to completely defuse the cycle of violence. Some people perceive it as a sign of "weakness".

Culturally, I think we still haven't learnt our lesson from that guy who got nailed (literally) for suggesting we be nice to each other, for a change. We morally remain at the second stage.

User Journal

Journal: LED Rubik's Cube 1

Journal by AceJohnny

I've been wanting to get back into hobby electronics for a while. I particularly wanted to make something with multicolored leds, mainly because of the "Ooh Shiny!" factor, and my love for smooth ambient lighting.
A slashdot comment recently gave me the idea of making a LED Rubik's Cube: a cube where each facet on a face is illuminated from the inside by a LED giving that facet its color.
It's immediately obvious that I couldn't build myself a functional Rubik's Cube: getting the wiring to work while the pieces move around is a problem that might not even be solvable. So the next idea is to have multi-colored LEDs for each facet, which change color to emulate the movement of the faces.
But that's just the ideal goal. I would already be very happy if I managed to make a not-too-large cube where each face is an array of 3x3 RGB LEDs, all independantly controlled.
Note that the center facet of each face does not change color.
The number of RGB leds necessary to make this is 3x3x6 = 54 leds. As we have three control wires for each LED, that gives us 162 wires to control!!
That's unimplementable if we want to be able to drive each LED directly, but through Charlieplexing, we can use a controller with 14 pins to control all that. (actually, you can control 182 leds with 14 pins).
The problem with Charliplexing is that one can only turn on a single LED at a time. To give the illusion of multiple leds, we exploit human persistence of vision and turn each LED rapidly in sequence. Problem is, the more LEDs we have, the less time each spends turned on, and thus seems dimmer. To complicate things, we already have to play with the RGB LED's duty cycle to manage the color!
An alternative to Charlieplexing the entire cube from one controller is to 'plex each face separately, under control of a minimal microntroller connected to a master through a serial port such as I2C. (how about cellular automata reacting automatically to their neighbours!? OK I'll stop). In this case, each face only has to 'plex 27 leds (9 RGB leds), which is manageable with 6 free pins, plus 2 for I2C, plus two for power => 10 pins. However, the PIC and (AFAICS) AVRTiny come in either 8 or 14 pin variants, so 14 pins will have to do...

Another possible trade would be to remove the bottom face from the cube.

It looks like some people like to play around as well:
James Clar

User Journal

Journal: C Annoyances

Journal by AceJohnny

I love C. It's my favorite language. Of course, as I work in the embedded systems field, I'd be very unhappy indeed if it were otherwise.

I love how it is a simple language (it's been said that it is a language that you can "hold in your head in its entirety", unlike C++). I love how the original reference book is the ultimate example of a well-made and concise manual. I love how it is universally supported. Most of all, I love how it maps to assembly in a pretty straightforward manner*.

But I'm still young, and I guess it's a sign of maturity that I start to realize its shortcomings and quirks.

- the difference between putting an include between or between "" ends up being arbitrary. Between carets, it is supposed to be a system include, and between quotes, it should be a user include. But with all the add-on user-libraries we install system-wide nowadays, the difference ends up being arbitrary and useless.

- multiple inclusions. A.c includes B.h and C.h, but B.h also includes C.h. Thus the compiler will complain that stuff defined in C.h is redefined. Hence the wonderful protections against multiple inclusions (#ifndef FOO\ #define FOO\ \ #endif FOO) that exist in header files around the world. Why this isn't yet handled automatically at CPP's level is beyond me.

- Actually, the whole include system is pretty broken. It stems from a technical problem, of course, but having to run around trying to find the include file that defines the function you need is unnecessary, nowadays. We've got powerful source-navigating engines, why aren't they included in the compilers?

- No multiple comment levels. When debugging, it is really useful to comment out a section of code, often increasingly larger. Or to comment out a section that includes comment. Nope, comments end at the first */, so not possible.

- why do people insist on hiding structs and enums inside opaque type names such as ts_thingie instead of a nice struct thingie? I find the latter so much clearer when going over code.

- portable code is a bloody mess full of #ifdef. Good luck trying to follow the flow of your code in that.

- TODO: put more stuff here.

Conclusion: this is just a rant that I needed to breathe out. Each problem I raised exists for a good reason and hasn't been universally solved for other good reasons, which I'm too lazy to research and give here (besides, that's not the point of a rant).
However, it's good spirit to know the limitations of the tools you're using.

I've got to do some Java some day.

*depends on the optimization level, of course, but that I can find the correspondence pretty easily most of the time never ceases to satisfy me.

User Journal

Journal: writing vs publishing 1

Journal by AceJohnny

I realize that this is the third post in a couple of days. I know that nobody reads this, but at this point it doesn't matter.

Why?

Because what's important to me is the need to express myself. That this doesn't reach anybody, that I get no feedback, is not important to the psychological mechanisms that make me write this. The only act of writing it down is enough to satisfy the urge. Anything else is bonus.

In fact, I believe that the important aspect of writing this is just to articulate my thoughts. As long as they stay in my mind, they are a confused mess. Only by writing it down can I see whether they make any sense.

Maybe I'm just fooling myself. Of course, if it gets to the point that I have to write it down, the thoughts are already articulate enough.

User Journal

Journal: GPL vs BSD

Journal by AceJohnny

Still today, in mid-2007, more than 18 years after the publication of the original GPL, and about the same time for the BSD license, people are still arguing about whether the GPL or BSD is the most free (as in speech) license.
Let's make is simple: BSD allows you to do much more with the code, at the expense of the freedom provided with subsequent modifications of the code. GPL restricts the way you can use the code, so that subsequent versions can enjoy the same freedom. GPL really is as free as can be, provided that freedom stays intact.
So there is more freedom with version N of BSD code than there is with GPL code, but you have no guarantee for modification N+1 of BSD code, whereas GPL code stays just as free.
Ask HP-UX users if they enjoy the same liberty with their system's code as HP did. Then ask GNU/Linux users if they enjoy the same liberty as the kernel hackers.

This has an impact on the quality evolution of software released under those licenses. With a BSD license, you can never insure that the original code will enjoy improvements made by licensees. You can always, technically, bring those improvements back to the original GPL code.

BSD code will be used far and wide. You'll get nice warm feelings to know that your code was used in the PS3, for example, though you'll never get to try it yourself, as the modifications will never come back to you. If you'd rather have that nice warm feeling, knowing that you helped out other people out of pure altruism (even if it enabled them to make billions of dollars[1] and they didn't give a cent back to you. Yeah, I'm flaming), then go BSD.
GPL ensures that everyone continues to enjoy the same liberty. As such, all changes are public, and can make their way back to the original source. So if you want your code to continue to improve from other's contributions, go GPL. Of course, this'll be at the expense of how far your code will spread, but otherwise that further spread won't benefit you (or your code). That warm feeling won't be as strong, but your code, your baby, will be better off.

If you really believe in freedom, what's the use of a freedom you can't ensure will last?

And by the way, downloading that pirated version of Spiderman 3 is the same copyright violation as using GPLed code in a proprietary application.

[1] at one point Windows' TCP/IP stack behaved identically to a BSD's, implying identical code.

[edit] About libraries: Not all GPL code is stand-alone. Some of it is part of libraries, and in this case, the GPL does strongly limit the use of the library in more ways than for stand-alone software. Libraries are components of larger software, and they are worthless by themselves. The GPL restricts the use of a library in that you cannot use it in non-GPL software. It is viral in the way that to use a GPL library, the whole software has to become GPL. The LGPL license exists so that you can still have a library under a GPL-like license, but it doesn't extend to the application using it.

User Journal

Journal: Right back atchya Slashdot 10

Journal by Sanity
Sorry about this, but Slashdot was crushing our server. We would very much appreciate it if you could select a random day next week and come back and check out Indy. Feel free to ask questions below or in the main slashdot comments, we will try to answer them as best we can. In the meantime here is the text of the front page on the site -

Indy is a music discovery program that learns what you like, and plays more of it. And it's free.

Indy makes it easy for you to find great new independent music. Just download Indy and double-click: as it plays songs, you rate what you hear. Indy quickly learns what you like and gets really smart about sending you more music you'll like. Let Indy help you find your place in the collective conciousness as you help other people find theirs.

DOWNLOAD NOW - Windows 98/2000/XP

Latest News
19th April, 2005, Build 3 Released - Read more...

Why Indy Rocks
You aren't just a target market - Indy can help you find your own path to the music you like. There are tons of great bands out there that don't have big labels promoting them; Indy helps you find them. And once Indy downloads a track, you can add it to your music collection, listen to it whenever and wherever you want. For musicians, Indy gives you a chance to reach a whole new audience that's excited about what you're playing. Best of all, it's free for everyone!

How Indy Works
Indy uses an advanced collaborative filtering system to predict what kind of music you'll enjoy hearing. As you rate songs, Indy finds out what you do and don't like. It compares your preferences with the ratings of all the other Indy users. For example, if you rate a song highly, and another user also likes the same song, Indy guesses that you'd probably like other music that they enjoyed. As you rate more songs, Indy will gets better and better at picking songs that you'll really enjoy.

Indy contains no adware or spyware.

User Journal

Journal: Email notification for new blog

Journal by Sanity
Some people pointed out that one of the nice things about /. is that they could immediately see when my blog had been updated.

To address this problem, my new blog can now send email notifications of updates. To receive these notifications, please sign up to this mailing list, or follow the link in the sidebar of my new blog.

User Journal

Journal: Blog has moved 4

Journal by Sanity
After many months of using Slashdot as my primary blog, I eventually decided that I could no longer put up with its various limitations. As a result, I have moved back to running my own blog software. You can find my new blog here, complete with various RSS feeds so that people can keep up.

10 to the 6th power Bicycles = 2 megacycles

Working...