Category Archives: General

Mafia Wars Secrets

Update: The strategy has changed a great deal and the first item on the list is not accurate. The developers of Mafia Wars seek to make the game not fun anymore and therefore the amount of time you need to invest has risen a great deal. It might still be fun, but it will take a while to get what you need and to get through all of the missions. Happy hunting!

Cheating is not the way to win a game, sure automated tools might enable you to “play” the game without actually having to spend the time to do so. The problem is that if you are going to do that, then why play at all? You don’t get anything by doing so, there is no end movie to enjoy. No prestige that will be given. If you are going to play the game, then play the game.

  1. Put all skill points to energy.

    This has been mentioned on many Mafia Wars strategy guides and well, I knew that before I even started. The key is that a well balanced player is looking at longer game play and sometimes that is great. However, if you want to get ahead quickly and the game allows for it, then it is better to put your skill in a few “powerful” skills than evenly distributed.

    The problem is that you are going to be attacked and lose money, but the thing is that, of course, others need the experience gained from attacking. The key is to put your money in the bank or purchase weapons and inventory when you need them as quickly as possible.

    If you can get to the point where you level every time you run out of energy then the game will breeze by and people will wonder how you did it. “Simple, I just thought logically on the best way to ‘win’.”

  2. Better use of reward points is to purchase skill points.

    The sad truth is that you are going to have to spend a lot of money to get enough rare items from boxes. I tried it, realized that I could have spent that to buy skill points instead and would have been able to level a great deal faster. Well, the game has to make its money, and if you want to enjoy the game, then go for it, but if you just want to get it out of your system, then the best way to level is to put all of your reward points to skill points.

  3. Earn reward points by signing up to Netflix’s, Gamefly, Travian, and other reputable companies.

    Most of the reward points services are going to rip you off or going to be impossibly difficult to complete. Don’t go for something that will probably go for your credit card and then continuous charge you for a service you aren’t going to need with extremely difficult opt-out procedures.

    I’m not saying that all of the companies are scams, but well, if you don’t know or trust the company, then don’t go for it. Netflix and Gamefly are useful services, in that there is value to them. If you were going to get them anyway, then what better reason than to get a 200+ reward points. I would follow rule 2, but buying a few boxes for the hell of it never hurt anyone and you might get lucky. Just don’t put more than a few in to it and put almost all to buying skill points.

  4. Join Mafia Wars mafia enrollment groups.

    Who has 500 real life friends on face book? I don’t. I’m sure that most of you don’t either. By joining a group like this you can get the 501 famed mafia to protect and allow you to offset the missing attack and defense skill points. I will advise that you do not join the so called free Godfather reward points groups, because I suspect foul play.

    Well, this could be termed “cheating,” but since it seems to almost be sanctioned by the developers, I will say that it is free game and exists in the gray area for the time being until the Mafia Wars terms of use is updated to prevent it.

  5. Put strong players in your top mafia.

    It will take a few weeks to get the max amount you can have in your mafia for attacking and defense. Doing so will capture some high level players to help you decrease the costs of energy to do jobs and increase the energy from doing jobs. This will enable the game to go much faster. Eventually, if you timed it right, you’ll be at a high enough level for others to want to place you in their top mafia and this will help you out to further your chances at leveling quickly.

  6. Do Cuba as soon as you can.

    Cuba gives you a great deal more energy, at almost double the energy costs at 10% for wheelman and 10% for mastermind, will be at higher ratios, for the max of the two. Doing this, will allow you to quickly “beat” the Cuba tiers and gain not only skill points to put towards energy, but also defense and attack bonuses and powerful weapons for attacking.

    After doing these, you should be at a level to do the jobs at similar levels in the New York job tiers. The problem with these is that the underboss and boss job tiers are very time consuming to complete and will require going back to the old job tiers to get the items necessary to complete the last two.

  7. Don’t Add too many friends in a single day.

    There is a slight problem with rule #4, in that Facebook likes to cancel accounts that add too many friends in a single day. Facebook thinks you are a scammer, bot, whatever and will close your account. If you are going to do rule #4, then be careful. Be careful with your privacy settings, so make sure that your email, address, and most settings about you are private to no one, so that you don’t have some mysterious guy showing up one day with a chainsaw (there are some real crazies out there, only a few with chainsaws that want to cut down trees). The other is only add a few more than allowed in Mafia Wars per day or week. There isn’t a few point to spend all of your time trying to get members in your mafia.

    If it takes a month to get 501 mafia members then great. It beats spending 23 hours trying to get 501 in a single day and then having Facebook close your account in a week.

Possibly Related Posts:


Chrome Shelled Regios Season 1 Complete

It appears that there will be either a season 2 or more seasons in the future. They decided to do the first season as a stand-alone, but leave it open to continue at a later point. I really hope the novels get translated, because it appears to be a book series, I would very much enjoy. As well, the manga doesn’t have too many volumes and will also be easy to purchase.

I haven’t yet read the novel series (can’t speak or read Japanese or whatever they call it in Japan), but I’m going to check to see if it will be coming to the US any time soon. The manga probably will have an easier time being translated, since more people will be more willing to “read” manga than a light novel.

That said, this also gives the light novel a chance to get ahead of the anime, so that the anime doesn’t have to use a lot of filler arcs as to not overcome the source material. This is usually looked down upon as it can break away too much from the arc of the original author and those who read the source material don’t like it. Often the filler arcs don’t have as much thought put into them, so are of lower quality story wise than what is in the source material. This isn’t always the case. However, the examples are few and far in-between.

The anime does give a sense of wanting to learn more about the world and the background of the series. The source material will have that, but I believe many of us will have to wait until the series is picked up by one of the networks or by one of the US distributors for the DVDs. In that way, the manga and light novels may also be picked up.

Possibly Related Posts:


Extending the Life of Brakes

It is quite simple really, you don’t use them.

I try not to use my brakes as much as possible, so this means that unless I’m too close to the car in front of me or going down a hill, I’m not going to brake. This works better on highways, than city streets. On the highway, I almost never have to use my brakes. My driving used to be primarily highway driving, but even in the city, you can coast to a stop, if you see that the light is red.

The faster you are driving the more force is required to maintain that speed. You have the wind drag and pavement friction acting on the car when you move past 60 miles an hour. Therefore, braking is redundant, unless you are extremely close to the car in front of you and need to stop even quicker. If you stay far enough back from the car in front, then you should be able to coast down to the proper speed before you ram in to that car.

There are problems with this method. Most drivers rely on the brake light to inform them that they too should put them brakes on. They will only know to slow down, if they are paying attention to the distance and most likely will force them to brake even harder to keep from slamming into you. It is wise to pay attention to the car behind and make sure they are at a far enough distance that they will be able to know to slow down as well or you may want to tap the brake to let them know.

I do this to keep from having to change the brakes on my car every six months, but it is still a good idea to get them checked and changed. A recent near accident let me know that it is better to have them when you need them and they better be in working order when you do.

Possibly Related Posts:


Short Term Jobs Lowers Unemployment for the Short Term

Of course, when you flood the job market with jobs that expire in a year or two, it will decrease the unemployment. That is common sense. However, the true measure of decreasing unemployment is either longer term government jobs, because they have a history of lasting forever, until either cutbacks are made (every decade or two). The second is creating jobs where the scope is longer term and the end is not foreseen. A clerk probably isn’t going to know that in 20 years, the company is going to go under, nor does the owner know that the company will. It is entirely likely that the job will carry on long after the original employee passes on and the next generation comes on.

An analogy can be made to the 1929 stock market crash, where those with a lot of money would flood the stock market on Friday, and then sell it all on Monday. This only served to destroy the stock market faster. Well, one of two events might happen. Either businesses are going to get the impression that the market is picking up when the unemployment goes down further or it is going to continue for the same reason it is now. What is going to happen to those who get the contracts to build the government projects after the job is finished?

Possibly Related Posts:


Forgetting Memorable Stories

Well, I still haven’t purchased the short lived TV series that used to be on the Sci-Fi channel. Supposedly, it has episodes that didn’t air or probably episodes I didn’t get to see. It was unfortunate, because based on the books, the TV series would of had a lot of promise.

I believe my one regret with reading a lot of books, was not recording the titles and authors of the stories I’ve read. I tend to forget those and the details within the books. Therefore it is slightly difficult to use them as an example or explain the details when I don’t even remember them. Some of the stories I wish to go back to for when I have children and need something to read to them. Perhaps, in the future it won’t be necessary to go to the library to pick up a book. The library may just as well be on the computer with the shelves of books reduced to a single slim device.

Or perhaps libraries will evolve as well and use the devices as well. Whereas I’d have to buy the books myself, the library would buy them for me. Allowing for a greater wealth of stories. Which is what I enjoy about books, you get to enter a world you never imagined before. I remember the 7th Tower series by an author I enjoyed reading.

In the 7th Tower series, you have a character running away from the impossible and finding an item of great importance, but not being aware of that fact until later. The world or worlds if you will is completely fascinating in that you have one group who pays the ultimate sacrifice to ensure that the other never forgets. Forget they do and so the journey begins with one from each group eventually doing what is right. Throughout it all, basically, they have little idea what the end is going to be or what secrets are hidden, just that they must reach a destination and succeed, because failing means death.

I also liked Sabriel, which opened me to a new -mancer, but to be honest, I was a little upset, because I had also developed a story with similar combinations of -mancers. I suppose, if I ever got around to finishing it and publishing the story, that comparisons will be made between the two. Albeit, the exist within two completely different settings, time periods, and characters. It was still interesting. There was a history and yet again, worlds that you only caught a brief look at. It was enjoyable to read the series.

I don’t think anyone is going to forget Harry Potter, but the next generation is probably going to be reminded. I’m sure it is going to be up there with the greats like Lord Of the Rings and Narnia. Although, with time, I guess Eragon will as well given enough time.

The Circle of Three and the Circle of Magic are two titles that are very similar, but are very different in story lines. The Circle of Three is more of a “Chick Flick” as it deals with more young female problems. Circle of Magic is a more of a child’s book, in that the structure is very simple, short, and easy to follow and read.

Forgotten Series

I’ve forgotten a series and a book, that may well also be a series. Trouble is, that I know the title of the first book, I just can’t spell it for the life of me. It is like Deimim, but it might have an ‘L’ in the title somewhere. It is a child’s or young adult story about three pre-teens who have special powers. Two are male and one is female. The background is that they were betrayed, so they put their lifeforce into three children of similar background. They were selfish, mean, and just really bad people. So they defeated themselves and complete the project that would allow them to not have to stay at the center of the universe. The cool part is that, the universe has many worlds, with unique features. So one world the magic is different and the challenges will also be different. It is basically a good story, and it had puzzles that were easy for anyone not in elementary school.

It bothers me, but I think the story would be great for any future generations I may have. The second story is not so much for children, because the themes are more adult oriented. It is about a black cat who visits a witch who discovered how to defeat death. Well, the black cat isn’t going to have any of that, so comes in to town to rectify the situation. That is as far as I got, because I became bored. Well, I also remember that the black cat ended the lives of a bird and of a science experiment.

It seems that now, the public library has a history of titles you’ve checked out, so that you’ll be able to go back and see what you’ve read. It is regretable, but I had plans on writing reviews of the stories I’ve read in the past. If I had done so, then it would have been a great deal easier to go back and pick up a lot of the old series.

That said, I think it is part of the adventure to discover the worlds within books, but while there are so many, there are also so few within the realms of libraries. Whether in schools or public libraries. Of course, one advantage to joining a book club or receiving suggestions from others is finding stories of interest.

Well, the Sword of Shannra and the Sword of Truth is an interesting series. You have to read the first to understand why. I haven’t yet read the Sword of Truth, but if it is as boring as the first, then I don’t believe I will. There is just something limiting or sad about the first series. It is a good series, but you have to battle just to read to the end. I haven’t yet read the complete third series (read the last book or two).

Possibly Related Posts:


WordCamp Chicago Walkaround Short

WordCamp Chicago Walkaround Short
Video sent by jacobsantos

I walked around the WordCamp Chicago conference room to try to get everyone who was there. Most of the video is blurry, so you won’t be able to tell very well.

There are really two key conversations of interest in this video. The first is my awkward conversation with Whats-his-face and Micah, where I didn’t know who Micah was.

To explain this, I have issues with names and faces. If you aren’t important, then I’m not going to remember you. Sorry, I’m a jerk, but it is true. Thing was, it would probably have been easier to just say, "Oh hey, I’m one of the speakers." and then I would have went, "Oh yeah, that is where I know your name."

Also, David Peralty and Jeff Chandler (Jeffr0) had a playful argument over Jeff’s voice not matching his appearance.

Possibly Related Posts:


WordCamp Chicago 2009 – Matt Mullenweg

WordCamp Chicago – Matt Mullenweg
Video sent by jacobsantos

Final Session for WordCamp Chicago with Matt Mullenweg. The State of the Word session was primarily a rehash and clarification of the WordCamp San Francisco State of the Word Session. A question and answer was included at the end as well.

Possibly Related Posts:


Dynamic Tree Building in PHP

I know of the data structure, I just never had the privilege of ever using it. It seems not many others have been intimate with building trees dynamically. Yeah sure, building a tree statically is easy and most people do so whether they realize it or not.

The problem I had is that PHP doesn’t offer built-in procedural or object-oriented tree support. Just Hash, Queue, and Stack, but you can use many of those functions with Tree data structures to traverse and edit a tree. Nothing that allows easily creating one or normalizing the tree. The Tree data structure has its own methods for easily searching for internal data that isn’t compatible with Hash types.

I decided to copy some of the resource above and also create an object-oriented Tree that better manages and searches the internal data.

Procedural Tree

To create a tree you have to first create an array and then create an reference to that array using its index.

$node = 0;
$parent[$node] = array();
$child = &$parent[$node];

It is better to create a recursive function if you are going to go into an unknown depth.

  1. Check to see if you need to continue
  2. Calculate which nodes will be children.
  3. Create a loop to add the children.
  4. Add a child to the parent.
  5. After each addition of children recursive go into the function with the previous child.

It is possible to crash PHP or use up vast amounts of memory very quickly within the infinite recursive loop. Therefore you need to make sure you allow for breaking the flow1 when the tree should not be created further. 2 is figuring out which nodes should be added to the parent and creating a loop3to add them. You’ll need to go into the recursive function5 right after adding each child4 to build the tree out.

My incorrect implementation of building a tree for Shortest Path First will give a better example of what I mean. You should not however use it, because it hasn’t been tested for correct functionality. It does build the tree, but it doesn’t do any additional checks, such as building the tree based on score and it needs to keep the coordinates somehow without going into an infinite loop. This isn’t showing how to implement the Dijkstra algorithm, or more accurately how to poorly implement the Dijkstra algorithm, but just the above algorithm.

// $Closed an array of nodes that will be used to create the tree.
// $measure is used to find the children.
// $tree is the reference to the tree data structure
// $end is used to end the recursion.
function buildTree($closed, $measure, array $tree, $coord, $end)
{
    // 1
    if(count($closed) == 0)
    {
        return;
    }

    // 2
    $perimeter = $measure->getPerimeterCells($coord);

    // bug
    // Part of 1
    $perimeterIndex = $closed->lookup($coord['x'], $coord['y'], $coord['z']);
    $closed->remove($perimeterIndex);

    // 3
    foreach($perimeter as $cell)
    {
        // This tests to see if the child node should be added
        // Part of Shortest path first so no explanation (which
        // would probably be incorrect anyway)
        $exists = $closed->lookup($cell['x'], $cell['y']);

        if($exists !== false)
        {
            // Index Creation: yes it is an string and yes it is
            // the index. Don't ask.
            $string = "$cell[x], $cell[y], 0";

            // WOOT! The end was found, no need to continue
            // The recursion, go back to the parent.
            if(($cell['x'] === $end['x']) && ($cell['y'] === $end['y']))
            {
                // The 0 would allow us to traverse the tree later to
                // find the instances where the end was found
                // and only keep those.

                // 4
                $tree[$string] = 0;
                return;
            }
            // Breed the parent
            else
            {
                // 4
                $tree[$string] = array();
                $nextNode = &$tree[$string];
            }

            // Ignore this
            $nodeCoord = $closed->seek($exists);

            // 5
            buildTree($closed, $measure, &$nextNode, $nodeCoord['node'], $end);
        }
    }
}

You would have to create the parent yourself, but the fun part is that nothing has to be returned. Since you created the parent you can then use that same parent for anything else you’ll need.

$parent[$node] = array();
$firstchild = &$parent[$node];

buildTree($closed, $measure, &$firstchild, $coord, $end);

print_r($parent);

One thing to look out for is that when doing recursion, much like loops, is that you have to give yourself a way to break out of the recursion to keep from having an infinite loop. There are a lot of ways for doing this, my example uses the easiest, but not the best.

Possibly Related Posts:


Creepiness

What defines a creeper? Does a creeper creep or does you creep the creeper? If it is the former, than is the creeping creeper a spider? If it is the latter, then I would be confused, because it wasn’t proper grammar.

I mean sometimes I look at a female, but how long do I have to look at the woman before I’m a creeper? If I briefly look accidentally, am I still one? Sometimes I’ll look at a woman for extended durations, until she looks away or gives chase after me. I don’t know if she is going to kick my ass or do things to me that I’d very much enjoy.

Pretty sure it is the former, and luckily I’m already in my car and just have to throw the telescope away. Of course, it isn’t easy driving with a huge telescope and I would think the person would see the humor in the obvious statement of staring. I mean, if I was really doing it to be a creep, I would be somewhere less obvious and use something smaller. Err, um, I would not know where or what that would be.

I mean, I’ve never called random people, randomly, and then just breathed heavily into the phone until they hung up. Well, okay, I wouldn’t do that purposely, I do have problems breathing, but I’m working out and you know, eventually I won’t have that as much. I have called people and then played out the Scream scene, except I wasn’t actually in the house, nor did anyone of them die. Also, they were family members. I’m not sure if they thought it was funny, but they never talked to me after that. Strange.

Um, does staring at a woman’s chest area constitute creepiness? Then if so, then yes, I am a creeper and I’d be proud of it!

Possibly Related Posts:


CorePress Revisited, Now ALW

It has caught on, I suppose, but a name change is in the works. Meh, Alternative Library for WordPress might work or ALW. All it is really is an BSD library that implements WordPress common features for PHP 5.2 and PHP 5.3 with emphasis on PHP 5.3, so namespaces, closures, and the like. The primary focus will be to implement something that implements both dependency injection and a similar plugin model that is in WordPress.

I’ve decided that I’m not going to maintain that much backwards compatibility with WordPress. I’m building this from the foundation to be my own, so there won’t be any license issues with going with New BSD and LGPL dual license.

Below I’m placing an emphasis on what I’m going to be developing for planning and for keeping track of what I’ve implemented. The key is that I’m going to be pretty much scrapping the last CorePress project and starting anew. The goal eventually, will be to use the project as an replacement to BackPress and for usage in a project to replace WordPress using Yii Framework (which is also New BSD). The project is not meant to fragment the community, because I doubt it will at this time, because hell, there isn’t any working code at this moment.

The problem I have is that WordPress is stuck in the PHP4 era and even when it jumps to PHP5, its architecture isn’t really going to be all that ready for PHP5 way of implementing classes and redoing the paradigm. I’m starting that now, so that hell, with as many frameworks as there are out there, why should WordPress have to maintain the controllers, views, etc implementation? I’ve looked at Yii Framework and it implements a lot of what WordPress has already, with a little work with models and views it should be a fine replacement.

The reason I haven’t yet started is that I’m unsure of whether is the best way to go. I know I’m going to do it, but others might not want to use the Yii Framework, so forcing it on them doesn’t seem like a wise choice. What I’m going to do actually is provide a library that will hook into WordPress, hook into Yii Framework, and allow others to create their own hooks for their projects.

Task Priority Est. Time Actual Time Unit Tests Done
Database 10 21 0 0%
Main class for loading the connector wrapper and managing a similar API to wpdb. Some work was done, but majority of it needs to be reduced and the scope limited. Will use Dependency Injection pattern to offset some tasks. 10 3 0 0%
Connector Interface for which to test for when accepting connector classes in the main class dependency injection implementation. 10 1 None 0%
Default PDO Connector class: loads WordPress DB constants as long as they exist or accepts parameters for connecting. 10 3 0 0%
Yii Framework Connector class: Basically just accepts or tries to pull in the Yii PDO connection. Will inherit from the default PDO Connector Class, so this shouldn’t take any time. 10 1 0 0%
MySQLi Connector class. Will pull in the WordPress variables, or accept parameters for connecting. 5 3 0 0%
MySQL Connector class. Will pull in the WordPress variables, or accept parameters for connecting. 2 3 0 0%
MySQL Connector class. Will pull in the WordPress variables, or accept parameters for connecting. 2 3 0 0%
Scheme Loader class. 8 4 0 0%
Plugin 10 21 0 0%
Factory Plugin Class. This class stores the plugins and actions class and returns the class to add, remove, and execute plugins. 10 3 0 0%
Hook Parent Class. The Actions and filters will extend this class and it will have majority of the functionality here. Just that the executing is different for filters and actions. 10 2 0 0%
Filter Class. 10 4 0 0%
Action Class 10 4 0 0%
ParameterList Class. This class will take the extra parameters and package them up for the hooks. They will only have to accept this class and then use it. 10 2 0 0%
Back-compatibility Hookable Class. This will provide backwards compatibility for classes that don’t wish to implement the Hookable class. It will be slower, but should function the same. 3 2 0 0%
Habari Compatibility Class. This will allow for loading a class and have the methods hook into available hooks automatically. 1 4 0 0%
HTTP API 7 24 0%
HTTP API Main class. This will initiate the request to the URL. This is different from the current implementation in WordPress in that everything is stored in this class and this class will delegate most of the functionality to other classes. 10 3 0 0%
Streams transport 10 2 0 0%
Fsockopen Transport 10 2 0 0%
cURL Transport 10 2 0 0%
HTTP Extension transport 10 2 0 0%
Compress Class. This will handle the deflate and sending compressed data to servers. 10 2 0 0%
Headers Class. This will handle the manipulation of headers. 10 2 0 0%
Cookies Class. I did not write the implementation in the WordPress HTTP API, therefore I will have to rewrite this on my own. If I follow the specs, I should be fine. 5 6 0 0%
Proxy Class. I’m not sure, but I wrote a lot of the current code in the WordPress HTTP API, so I’ll still be able to use it for here. There are changes I’ll be making, detailed below. 10 2 0 0%
Deflate Class. Handles deflate support for the response. 10 1 0 0%
Template 0%
CRUD 0%
Users Table. 10 4 0 0%
Posts Table 10 4 0 0%
Taxonomy Scheme Classes. The implementation will be a bit more complex, since handling one table per class would be worthless. Each table has to be handled together given a specific task. 10 10 0 0%
Meta Data Table. 10 1 0 0%
Options Table. 10 1 0 0%
Authentication / Authorization 0%
Registering. Uses Dependency Injection for implementation. 10 5 0 0%
Authentication. Uses Dependency Injection for implementation. 10 5 0 0%
Authorization. Uses Dependency Injection for implementation. 10 5 0 0%
Widget 0%
Widget Management. Adding widgets controls to Widget areas. Remove widgets controls from widget areas. Will have file, manual and database backend. 7 10 0 0%
Widget Control. Base Class, Single Widget Class (extends Base), Multiple Widget Class (extends Base). 7 6 0 0%
Widget Area. Registering Widget Areas. Displaying Widget Areas. Checking widget area contains controls. Manually adding Widgets. Getting widgets controls from database. 7 6 0 0%
Default Widget controls. 5 10 0 0%
Caching 0%
Caching Class. API for adding contents to the cache, then managing. Majority of the work will be delegated to other classes below. 7 3 0 0%
Memory, per request cache. Similar to default in WordPress. Allows for only calling SQL queries once per request, instead of fetching multiple times. 7 4 0 0%
XCache Variable Caching. If variable caching is enabled in XCache, then this class will use it. 7 3 0 0%
Memcache Caching Class. This implementation will use Memcache, if it is available. 3 4 0 0%
APC Variable Caching. Will cache using the variable cache in APC, if extension is available. 7 3 0 0%
Dependencies 0%
Dependencies Class. Adds and queues scripts and style sheets, so that printing the lines out can be simplified for the developer. 7 2 0 0%
Output Classes. The dependencies that are outputed will have helpers for outputting the scripts and stylesheets in the header and footer. 7 4 0 0%
Security 0%
Base Security Class. The goal is to implement very little of security into the library and rely on external libraries (Zend Framework, PHPass, etc) for implementation. Inclusion of the WordPress API will most likely be GPL, since the code would be pulled from the WordPress library. That is not ideal in a New BSD library, so any attempt will be to either not have it and delegate it out to another library or to rewrite to be compatible with New BSD licensing. 10 10 0 0%
HTTP validation and sanitization. This will wrap HTML Purifier (separate library, will not be packaged with ALW), KSES, and regular wrapper for PHP strip_tags. Other libraries will be evaluated as well. 10 10 0 0%
Uploading Security. Image validation, File extension upload validation, etc. This is done so often that basically it is part of majority of libraries and packages. 10 5 0 0%
Streams transport 10 2 0 0%
Upload 0%
Uploader Class. Wrapper for controlling the security and placement of the uploaded files. 7 7 0 0%
SWFupload Wrapper. Implementation to get SWFupload and JavaScript progress uploading working. 3 15 0 0%
Image 0%
Resize Class. The goal is to dynamically resize images. 5 4 0 0%
Cropping Class. This will include integration with jCrop jQuery plugin, but won’t require it. 5 4 0 0%
GD Implementation. Pluggable class for the above two implementations that uses the GD extension. 5 7 0 0%
ImageMagick Implementation. Pluggable class for the above two implementations that uses one of the two ImageMagick PECL extensions. 3 7 0 0%
Debug 0%
Timer Class. Keeps track of time. As well as individual anon and named timers. 5 2 0 0%
Deprecated Class. Informs caller that the usage of the function, method, or class is deprecated and will be removed in a future version. 5 2 0 0%
Debugger Class. This class captures the errors and exceptions and allows for a plugin to write it to a log or to display it. It will also enable or display globally the debugging. Not having debugging should speed up execution, since errors won’t be written to the database or to a file. 5 4 0 0%
Error Output Class. This class and function utility will display an formatted message to the user. The format can be HTML, JSON, or XML, or XMLRPC. 5 8 0 0%
Logger Class. This will log to either the database or to a file. 5 4 0 0%
Installer / Upgrader 1 68 0%
Installer Class. Main class, lets the actions know that an installation is taking place. 10 4 0 0%
Upgrader Class. Main upgrade class, lets the actions know that an upgrade is taking place. 10 4 0 0%
Requirement Class. Used to test for a prerequisite is available. This will be a parent class or abstract class. 10 4 0 0%
Default Requirement classes that are available for the user to plugin to the installer or upgrader class by default. 8 16 0 0%
Information Class. Informs the installer about the specs they have. Will also be a parent or abstract class. 10 4 0 0%
Available Information classes that are available to the developer by default. 8 16 0 0%
Action Class 10 4 0 0%
DB Table Scheme Class. Extends the Action Class to create tables. Will also run modifications to tables as well. 8 8 0 0%
DB Table Row Scheme Class. Extends the Action Class to create rows in existing tables. 8 8 0 0%

Test Cases

The goal is to have at least 80% code coverage for every library component. Not that code coverage is a good indicator of flaws and bugs, but it is far easier to extend into fringe areas if at least the majority of the library has tests. The goal is to correctly test that the code is working as well as try to break the damn code (which is extremely difficult to do when you know too much about the code).

Another issue I have is that it increases the time for developing the library when you are writing inline documentation and unit tests. It extends the time further when you have to build mock classes to accurately test some of the library code. It is one of the issues I had when writing the library before was that it felt like I wasn’t getting anywhere when I had to correct so many tests.

Well, the reason I continued to do it was that it would be worth it in the future. I should still be able to use some of the test cases that I’ve written as well as some of the code. It will increase the motivation to continue and the DB parts I’m going to focus on completing enough to have it working

Installer / Upgrader Task

The upgrader, installer task is to implement a simple contained task based class structure. How the page is handled is outside the scope of the API. The user can do it by smoke signals or a front controller or page controller. The key is that if successful, a certains of events will be performed and if it is a failure, it exits and prints a message to the user. The key is that with WordPress, the Installer is largely a huge mess and navigating it, is not fun.

The point is that the person should be able to extend or remove elements from the installer and upgrader with ease. I like certain elements of how the WordPress installer is implemented and something like this really needs to be separated from the main application. I’m also going to try other ways to do this. A FTP installer where you basically download a small package and then able to choose which parts you actually install would be cool as well, but that would just be another action or class that will exist for the developer to implement in the installer.

I’m going to start small, with something that just replaces what is in WordPress. The Package name will be external from the rest of the library. This will keep it from being confused with the core library replacement for WordPress. Its falls under administration API, so its priority is pretty low.

HTTP API

Well, since I hold the copyright for some of the code in WordPress, I can take what I had and work off of it. So it won’t be building from the ground up again. I think I’m going to use a different pattern than what is in WordPress currently. There is something I had wanted to explore with the code I added into WordPress, but I never got around to implementing it, nor was I sure how I would go about doing so.

The problem is that similar actions are performed in different locations, so it almost makes more sense to handle it that sort of way. You know, basically have the API where the data is added, and the transport handles it based on the different classes. I think this will be step up in the architecture, but still wouldn’t be perfect. Also I think it would be better to make it completely independent of WordPress and the API, so I’m going to do the same thing as the Installer and Upgrader. I’m going to place this in its own package name.

Database Scheme

I’m interested in what better ways there can be for writing the Database Scheme. I’m going to attempt three ways on how to do this and then I’m going to implement something like ADODB as well. That said, I’m going to experiment with an installer for the WordPress for the database scheme.

  1. Different classes with the SQL inline for each CRUD implementation for each table.

    Advantages: I don’t know. It is something I’m familiar with, so it will be super easy for me to implement. It should work the same no matter which DBMS I’m working with when using the Scheme Loader class.

    Disadvantages: I’ll still need an interface to plug in the different scheme. This will be somewhat different from what I’ve implemented in the past, so it is unlikely to be perfect when first developed.

  2. CRUD class class in Scheme class that contains the SQL statements.

    Advantages: Depends, I’ll have all of the SQL contained in a single place, so that when I need to make a change, I can do so in one location or a few locations. This may simplify things, but…

    Disadvantages: This is uncharted territory, so what SQL might work in one table might need to be handled differently in another. If I’m working with prepared statements, it should make it easier, but still seems a little unclean.

  3. CRUD class class in Scheme class that contains the SQL query.

    Advantages: This is different from the first one in that the CRUD class does the checking and pulls in the correct Scheme class to perform the action. Probably better than 2 in that I don’t have to worry about unforeseen limitations with the second choice when switching to another DBMS.

    Disadvantages: I’ll probably have to do more work, because I’ll be basically duplicating code that would be in a single class in option 1, so it will take longer to implement.

Overall, I think I’ll have the best bet with 1, so I’m going to attempt it first. Well, the nice part with dealing with a single class is that if I decide in the future to do it the second or third way, then I won’t have to do extreme rewrites of the code that depends on the actions with the database. Even if I’m using ADODB, I’ll still be able to use a single class and just have one scheme to pull in. I’ll be doing benchmarks to determine if it is a good idea.

Possibly Related Posts: