Divide by Null - undefined

Infinitesimals

Voicemail has its uses, for example, when one won't be able to pick up the phone for awhile, but needs to relay a message immediately, or when other forms of communication are not possible, i.e. e-mail or texting is inconvenient or irrelevant.

However, I still usually end up ignoring it, thus rendering most of the pros as moot.

(1) Oct 10, 08 - 11:18 AM

On the subject of high school friends, just because you're different, doesn't mean you can't be friends.

(0) Jun 17, 07 - 11:41 PM

Pi is wrong.

Well, actually, maybe it would just be better to use what is currently known as 2*pi. I've always thought it would be easier if sine and cosine had periods that were just pi, not 2pi.

So should pi be 6.283185...? Should pi be the ratio of the circumference of a circle to its radius, instead of diameter? If so, it would take about 50 years for this to gain any momentum in the mathematical community.

(0) Apr 20, 07 - 1:07 AM

Lazy programming

Thursday, October 26, 2006 | 2:34:24 AM
Avatar

I think I've reached the point in my programming career (at least with PHP) that I can start working off the scripts of other people instead of doing it by myself to learn. For example, this blog. So now I know I can make a blog. Gimme wordpress now. XML-RPC has been ugh to implement, but I've been getting it started. I've just been too lazy to work the extraction of links in my posts. In addition, it's annoying to test it out and debug.

That's just one example, of course.

There comes a point where doing it all alone is too much. Why not take advantage of these scripts? I'll still be able to modify to my own needs, but the grunt work will be finished.

Plus, these regular expressions are annoying me. I don't really see any reason why some of them aren't working. I even tested it on RegExLib and it gets the data just fine. PHP is buggy, eh?

So I think I'll stop trying to make things from scratch if possible. I'm too lazy to implement some things sometimes, and it's not too bad to modify nice code.

Comments (0)

Fun with Regular Expressions

Sunday, June 18, 2006 | 3:53:02 PM
Avatar

I wanted to set up a simple way to add HTML to my entries. In this way, people can also style their comments. Instead of <b>bold</b>, one can use asterisks. It should be *much* easier this way. I'm testing it right now by putting everything I added in, but I really hope it doesn't need -too much- any editing to my PHP.

I'll also need to add a few backslashes later to *stop* it from -changing- when desired. At least those. Then there's also compound-word protection- or sometypes of* under_score things_and such. Also* *-I-* -need- -work- on -*compounding- -these-*. It shouldn't be too hard2 to accomplish0, I hope.

Then there's the links (/) to add. Molto Marcato gets a free plug here. The links were actually the most difficult part, such as random text links to http://www.google.com. Or, I may get rid of the scheme and only do http://www.google.com and such. It might be a bit more difficult than I thought Oh yes, can't forget titles and maybe I'll add rel information if I need it later.

Now... lists and blockquotes?

  1. List item
  2. Second item
  • now
  • it's
  • unordered
I say that this is a quote!
Ryan (myself)

Image capabilities will likely be added soon.


An orange

So, I hope that these things will be fixed and soon you won't even see the code =P.

When that time comes, I'll probably make a new page explaining how to use it for commenting purposes and such. It seems Web 2.0 ish with it's neverending beta, since I'll probably keep changing it when I want to add something new.

What do ya'll think?

Comments (0)

Classes with Class and Atomic Feed

Monday, May 15, 2006 | 11:59:01 PM
Avatar

I am happy. I have reached a new height regarding PHP. I created my own PHP class.

I looked at my RSS feed creator and i thought, "Wow... what's this?" I wondered how I could clean it up and make all of my feed writers as efficient at the same time. It then dawned on me... this would be a perfect place to implement a class.

In case you didn't know, a class in object-oriented programming (OOP) is a set of variables and functions that work together to organize the code better. Java is an example of a completely OOP language. PHP is mostly procedural, but can support objects.

PHP Object support was really poor in version 4. Even when it improved, I never found use for it. I could always do the same thing without objects, but that wasn't always the most efficient. I wanted to be more efficient now, but I didn't care for it in my earlier days. I had no clue what a-do for OOP, but as I learned Java, it all began to make sense why one would use it.

Anyway, I toiled on my little AtomFeed class. I chose Atom over RSS because it seemed better. It could change with the times, as opposed to the frozen state of atom. It also seemed more structured. But anyway, I managed to create it. It's set for PHP 4. I hope to move to PHP5 and I won't mind updating the code accordingly. One has to change with the times, after all.

Then, I updated the data transfer scripts to take the info from the database and put it into the new class. When I tested (and thoroughly debugged) it, By Jove, it worked! That made me happy.

Thus, my second titular news: feeds are updated. I abandoned RSS in favor of Atom. I now only have one main feed, removing the RSS version, and I transferred the mini-entry feed to Atom. Thus, I now have a standard way to modify my scripts.

Now back to programming. Java. My AP test is in two days. I haven't read much of the book, but I know enough PHP to know enough Java. The thing about programming is one only needs to know the basics: variables, types, comparisons, arrays, and control structures. Then learn common functions. After that, each language has its own refined points, so just learn them. Of course, this is just based on my limited knowledge of Javascript, PHP, and Java. I have dabbled in C and C++ and seen that they're quite similar. This does not apply to assembly lanuages or certain novelty languages. But yeah, I should read more on Java. I just got done with polymorphism and inheritence. I have quite a few more chapters to go, but I didn't do badly on the practice exam. Doesn't mean I can't improve, of course.

On the topic of PHP, I must remind myself to implement tag deletion on my entry edit page. This is my reminder. Oh yeah... comment fixin's. (Not a possessive 's, just to clarify)

And another topic. I noticed myself using a lot of "anyways" and random digressions. I've been Catcher in the Rye'd?

Comments (3)

Starting anew

Tuesday, May 2, 2006 | 2:36:35 AM
Avatar

Welcome to my blog!

I decided that I wanted to start this up again. I felt a desire to do some programming and I had a habit of writing more than usual. I concatenated the two with this: I programmed this blog in PHP and now can write whatever I want on it!

This will probably be a permanent work in progress; I'll always be updating it to add new features, suit my needs, or just to play around. Right now, This is the first stable release since way back in 2004. I shall call it 0.2.1.

Feel free to leave comments on any ideas you have on features or anything I can add.

But now, it's time for sleep. This week is test week. CST Math on Mon, AP on Tues, Wed, and Fri, Driving on Thu, and SAT on Sat.

Don't forget to drink your mango juice today tomorrow!

Comments (4)