projectb14ck

Random thoughts of a happy programmer.

Writing is Hard

One thing I am absolutely horrible at is writing. I may be able to throw a few sentences together, but I am absolutely horrible at writing. Why is that? Mostly because I’m afraid. There are so many things I’d like to write about, new programming ideas, new techniques learned, interesting technical and non-technical content, but I never make myself do it. I’ll get started, open up my CMS, pick a topic, and start writing–but never find the will to finish.

I was reflecting on this all last week, and came to the conclusion that I hate to fail. When I start writing, I envision a perfect article / blog post / paper that everyone will love, and that will be absolutely perfect. But when I actually start writing, I realize how much energy and effort is required in order to make it as perfect as I envision, and then give up, knowing that I will not be able to reach that level.

So I’m making a resolution with myself that I’ll try to strictly enforce: if I start writing something I will finish it, no matter how bad it turns out to be.

I think it will be a great learning tool for me, to force myself to improve as a writer and a thinker, and I’m looking forward to it.

Writing is hard.

pycall Unleashed

A few months back I released the first version of my rather popular Asterisk call file library, pycall. pycall is a python library which makes creating and using Asterisk call files extremely, EXTREMELY easy. Since its inception, I’ve used pycall in several production environments, and for various other small projects that I’ve worked on.

The past couple weeks I’ve been working on my web design skills, and decided to make an information site for pycall which contains documentation, examples, and a tutorial to help users get acquainted with the neat features that pycall offers. So I present to you: http://pycall.org/. Check it out and let me know what you think :)

Also, if you’ve used pycall for a project, and want to get famous, see http://pycall.org/examples. I’m asking for any code contributions to host up there and share with the world.

Enjoy.

Neat Thing I Learned Today – Part 1

In C, you can index arrays with either the array subscript inside of the typical square brackets:

arr[0]
or, with the less common (and somewhat mistifying):

0[arr]
Now, I’ve been using C for quite a while, but never realized that you could do this. It is definitely awesome, and could be really useful in some obfuscated programs. Now, just to make sure that this actually works, feel free to test it out. I wrote a really small sample program that runs a test (if it doesn’t work, please leave a comment with your compiler as I’d be interested to know if it doesn’t work on all platforms. Anyhow, feel free to use my source if you want.

The really interesting thing about this, is why it works. On the Stack Overflow discussion page for Strangest language feature, the user Michel explains why it works.

that’s because a[10] means *(a+10) … and 10[a] means *(10+a) :)

Pretty awesome. Anyhow, hope you learned something new, I sure did! Thanks Stack Overflow :)

New Book

A couple of months ago I ordered a copy of Brian W. Kernighan and Rob Pike’s book: The Practice of Programming. This book caught my eye as it was written by two of my idols, (Brian W. Kernighan is a co-author of the C programming language, and Rob Pike is a UNIX programming god). The book covers programming style, efficiency, and testing (three very overlooked topics), and I figured that even though I tend to think I have excellent programming style, I could learn something about efficiency and testing.

To help myself learn material better, I’m actually trying something new with this book. I’ve created a github project, pop, and plan on solving all of the exercises in the book and keeping them version controlled within my pop project. I’m hoping that this forces me to really think about solutions and work them out as best I can. I figure that it will also give other people a reference / learning tool if they ever plan on delving into Kernighan and Pike’s book at some point in the future.

So if you are interested, check out the project and I’ll keep it updated as I go along!

Asterisk 1.6 AGI C Library Project

I’m announcing my Asterisk 1.6 C AGI library for developers (cAGI). cAGI is a fully compliant Asterisk 1.6 AGI library for C developers. It can be used in production (I’ve been using it on several production boxes for the past 5 months), and has been generally well tested.

cAGI was originally part of my WildPBX project, but I’ve decided to release it as an individual project to help speed up development, and loosely couple the entire WildPBX project.

Currently, I’m cleaning up the cAGI code base, and building a good Makefile for installing the library (so that the includes can be used from anywhere). It will be ready soon, I promise!

Stay tuned for more updates :)

Google Wave Invites

So if anyone wants a google wave invite, I now have them (25 to be precise). Wave is pretty cool so far, I’m definitely liking it :) Leave a comment if you’d like one!

atkbot Is Progressing Nicely

My IRC takeover bot, atkbot, is progressing nicely. Some of the features it now has are:

  • Simple configuration file.
  • Can connect to IRC networks that are password protected.
  • Can join multiple channels by default (specified in the configuration file), or none at all (just lurk on the server).
  • Will automatically re-connect if kicked from the network, or if the internet goes down.
  • Can be instructed to join one or many IRC channels via PMs from bot operators.
  • Will maintain operator status once it has taken over a channel. EG: If it gets ops and kicks everyone out of the room (and bans them!), it will also actively watch for new people joining the channel and remove them as well.
  • Will auto op any bot operators who enter the channel (or who are already in the channel when the takeover happens).
  • Can be instructed to join all channels on the current IRC server.
  • Has a customizable part message which it will use when instructed to leave a channel.
  • Supports variable command prefixes for bot operators to use. You can put in any string: (~, !, etc.)
  • If the bot’s nick is already taken, it will automatically choose another nick.
  • Alert’s all bot operators via channel invite and private message when a channel is taken over, easily alerting the owners so they can take action.

Overall, I think atkbot is going pretty damn good. I have been casually working on it for a few weeks now, and I’m liking it more and more. I still plan on adding a lot of features, like more advanced takeover options, support for multiple IRC networks, etc. — but I plan on building this into a working release soon.

One of the things I’m currently debating is packaging. How should I package atkbot? I’m open to suggestions.

The way I do my development uses GNUmake to build, and run the bot. I’m debating myself on whether I should port atkbot to a systems-level type program (that installs to a global path), or whether it should remain as a standalone program which must be downloaded and ran from within its local directory structure.

Anyhow, development and progress will continue! If you have any input, I’d be happy to have it.

Sunday Night Hacking

Time for another session of my favorite: Sunday night hacking. Need to finish some bugfixes in a voice broadcasting system I’ve been writing, as well as hopefully implement some features in my atkbot project.

My energy drink of the day is Full Throttle original.

Anyone else staying up hacking tonight? Best of luck!

New Project: atkbot for IRC Takeovers

A little over a week ago I started working on a new project for fun in my freetime: atkbot.

atkbot is a cross platform IRC bot written in Java, designed to takeover IRC channels.”

Those of you who know me know that I’ve been using IRC forever. IRC (if you aren’t aware) stands for internet relay chat. It’s a pretty old protocol for chatting (in text) with friends. Tons of people still use IRC today, and it is a popular way to communicate with people.

IRC bots are programs which simulate a person, and provide certain functionality to IRC users. Most IRC bots are trivia games, or chat room monitoring tools, but there are also takeover bots which try to take over chat rooms and remove users from them. And this is the goal of atkbot.

atkbot doesn’t make use of any exploits, or anything like that, it simply joins IRC channels, and waits to be given operator status. Once it is given operator status, it bans and kicks all users from the room, sends channel invites to the bot operators (specified in the bot config files), and then private messages them as well to let them know that the channel has been taken over.

atkbot is cross-platform (will run on anything with Java), and is going to be highly configurable. I’m currently cleaning up the development code, and plan on pushing a first release at some point this weekend. The configs are simple and straight forward (see the config file for information), and should be completely independent of any other system packages.

I decided to write atkbot for fun as a little side project to make me laugh a bit. Please don’t use it for anything truly evil :)

I’ll post some updates once the first version is released. If you have any suggestions or features that you think should be added, please let me know!

Neverfear

Just so you know, my articles will always be put up on my personal blog (this site), and http://neverfear.org/. Neverfear is a site that some of my good friends and I contribute to. So if you prefer to see them in a little better formatting, please visit Neverfear.

That is all.

Page 2 of 3«123»
© 2008-2009 projectb14ck
Powered by Wordpress and made by Guerrilla