36 Cube

So I’ve been geeking out over a puzzle that I got for Christmas this year. The puzzle is called 36 Cube. If you have this puzzle, and haven’t solved this cube, or would like to in the future, or have any other reservations about reading spoilers,

PLEASE STOP READING.

This is not a hints post, and I do not ease you into a solution slowly. This is a post about how I solved the puzzle and some interesting facts about the puzzle I found out afterwards when I began to dive deeper into the solution set. As well as the programming that went with it.

If you would like some proper hand-holding, please see How to solve the 36 Cube puzzle – hints & solution for hints (and samples of the program that got me started down my path).

AGAIN, IF YOU DON’T WANT SPOILERS, PLEASE STOP READING!
Continue reading “36 Cube”

new browser

being a web developer, i try to keep up with what’s going on in the browser realm of the interwebs. today saw the release of the new Google browser: Chrome.  a new browser release is nothing new, but the fact that Google has, for quite some time, been the main ‘internet’ company, providing everything from search engine and page cache, to email, web documents, and calendar, all online, makes this browser release something to look at.

Continue reading “new browser”

webhost issues

my site went down about a week and a bit ago, so i tried to contact my hosting company and find out what was going on.
I went to the website, no notices there, went to the forum which has been removed, tried to submit a service ticket which i couldn’t do due to lack of a password for the system, and finally tried to call the 800 number which was blocked from my area code. all this took about 2-3 days, all of which saw no return of my website.

i finally found a regular number that i called and got in touch with an actual person and found out that 16 of the servers that this company owned got hacked and had all the data erased. no backups, no data, no nothing.

they finally got in touch with us (4 days later) and let us know what had happened.

i finally got a password for the support ticket system and submitted a support ticket for my website to be reinstated.
i must admit it was a very prompt reply, but the information they had given me was completely wrong, it was for another user and another site. I let them know they had messed up and they never replied. i told them again…   nothing. i finally wrote them a nasty little note and they promptly responded in kind.

i finally got my corrected information and got my site uploaded, but whenever i tried ta access it it would redirect to another website totally unrelated to my own.

it is still having issues, but my site is back up (thanks to backups i had made a week before the attack), my mail is finally working, but there are still some small issues with the site.

so…  long story short…   don’t host your site through webhostplus. their service sucks.

damn my a.d.d.

so i’m trying to make a php game (commanders) from scratch and it’s not going quite as fast or as easy as i’d hoped. there are a lot of little things that you have to plan for when coding an application from scratch, no matter what it is, that will bite you in the ass.

when i first got the idea for this game, i thought “i’ll get the game part of the script working and the rest will be easy”.  nope. first off, i have to get the game part working…  it’s not. not quite. secondly, i get distracted by other things WAY too easily. and thirdly, i really have no idea where i’m trying to take this.

i started off with an overly simplistic plan. not on purpose, but because i have no experience coding anything from scratch, after writing a preliminary few hundred lines of code, and trying to test that code, i began to realize that my storage methods (both within the database, and during code execution) were grossly underestimated. it took an almost complete rewrite of the existing methods and all the code that goes with it to get to a point where the game will actually progress the way that i want it to.

but now that i’ve got the game almost working, there are other issues that are creeping in that i wasn’t ready for. for instance, the game that i am creating is actually a port from a real life board game (Power).  the trouble with this is that issues that are trivially easy for a person to deal with are intricately difficult for a computer to deal with. i’ll spare you the details, sufice to say that my code is becoming much longer than i had planned. porting form a real board game also has the added benefit of having the rules already written, or at least most of them, but the ones that aren’t written are the ones giving me the troubles. what should i do if this situation happens?  what about this other situation?

another issue i have to deal with is myself. when i get in one of those moods, as i’m sure most of you have, where the juices just aren’t flowing, we’ll call it “coders block”, i turn to other items that may not be necessary to the project. i’ve also started another (albeit much smaller, simpler) game (battleship) from scratch which is progressing much faster and therefore holds my interest better. this is bad. even though the new project is nearing completion, i know that i am the type of person who will never think of anything as “completed”.

and on top of all this i am still working on webchess 2.0 (which finally had a beta release not too long ago).

so i now have three projects i’m actively working on, my job, and a freaking network+ test to take on monday.

and i have to spend more time with my wife, who is probably feeling pretty left out at the moment.

so here’s my time division:

  • my job (30%)
  • my projects (30%)
  • eating and sleeping (30%)
  • studying (10%)
  • my wife (110%)

if it weren’t for my a.d.d., i’d think i have a real problem.

(note: i’m not officially diagnosed with a.d.d., but most everybody i know would love some ritalin)

PHP scripts and games

So I’ve been adding a few RPGs and other games to the site and have had to edit those scripts quite a lot more than I should have to to get them to work on my site. Don’t get me wrong (especially if you happen to be a creator of one of those scripts), I love the games, and they have MANY good features in them, but it amazes me how much people code to their own setup. One example (and the most annoying because it breaks the script immediately), is the use of PHP short tags ( <? ). These little things are the bane of my existance.

There are four ways that you can let the server know that you are about to use PHP.

  • PHP Long tags ( <?php ...code... ?> )
  • PHP Short tags ( <? ...code... ?> )
  • ASP style tags ( <% ...code... %> )
  • Script tags ( <script language="text/php"> ...code... </script> )

Lucky for me, I’ve never seen the ASP tags, and have only rarely seen the Script tag, but the short tags are almost as popular as the long tags. Especially when using the shorthand notation for the echo command ( <?= ).

My server at home is set up to be very strict in it’s handling of tags, it only allows the PHP long tags, and for good reason. When using a PHP script with XML, the XML tag ( <?xml ) confuses the PHP parser into thinking it’s a PHP short tag with the unknown entity ‘xml’ following it.

Another thing I see people use often, is Registered Globals. These are extremely handy at saving yourself some keystrokes, but that’s about the only thing they are good for. Registered Globals take variables from a SuperGlobal and place it in the normal variable scope. An example would be an HTML form with a field called ‘name’.  When you send this form, a variable in PHP called either _POST or _GET is created based on which method is used to send the data. To get at the data the user sent, one must call $_POST['name'].  If Registered Globals is turned on, all one needs to do is call the variable $name and there ya go. This practice is not very safe and causes more headaches then they save in keystrokes.

All of these issues, plus some more obscure ones, are why people should not code to their own particular setup, but should code with certain standards that are applicable everywhere.

  • PHP Long tags are ALWAYS accepted by the server.
  • The _POST and _GET variables are ALWAYS available to the script.
  • The HTTP_XXXXX_VARS are NOT always available, as of PHP5 they can be disabled.
  • Even the _ENV and _SERVER vars are not always enabled.

So when you go out to write your first bit of code, or even continue work on a project you’ve been working on for years, think of the other people who may be using your script who may not have the same setup as you, and they may not have access to their php.ini file to change those settings. And don’t try to skirt your way around it by running the ini_set function either. That’s almost like putting a virus on someone else’s computer. Just don’t do it.

new job and web standards

so i got a new job working for a local independent graphic designer / printer and its pretty nice. i get to work when i want, at my own pace, from home, doing what i love, and get paid for it. the only thing about it that really sucks is that i’m doing web design and as any semi-serious web designer that works for clients will tell you, coding for cross-browser compatibility SUCKS !!

i mean, why can’t all the browsers stop the damn browser wars and come to an agreement on what will and will not be supported?  it seems that the w3c has been doing a good job with stating what should be standard and what should not be standard, and most browsers do a pretty god job following those standards.

except one. microsoft’s internet explorer, the number one used browser on the planet. it works the way it wants to work, and getting your site to look the way you want it to in internet explorer is like trying to teach a four year old how to fly a plane. they may get some things right, but most of the time, they budge things up so bad, you have no idea what they are trying to do. and then all of a sudden, they don’t want to do anything anymore. it is the most annoying thing on the planet, because fixing one thing breaks another and when you get it all looking good in internet explorer and then go back and open up the same page in firefox (my personal favorite and most likely the favorite browser of any self-respecting web designer / aficionado) it looks totally whacked and nothing is where it is supposed to be.

and that’s not even considering the dinosaurs out there, who just absolutely have to have thier netscape communicator 4.75, which has almost no current standards support and what it does support (obsolete and completely annoying things like ‘blink’) it supports badly or is no longer a web standard.

but that’s okay, i figure anybody using web browsers older than the wheel are probably used to things looking all messed up, or they are too computer illiterate to care.

i eagerly await the release of internet explorer 7 (which has taken several years, because microsoft, in all thier wisdom, thought, “we have the monopoly on web browsers, why fuck with it?”. that is, until firefox started taking thier precious users and microsoft just HAS to have the monopoly) because that will mean (hopefully) that interent explorer will finally have decent web standards and png support and i won’t have to keep writing several versions of the same page just to get it to look right everywhere. (but hopefully it will still be subject to the same css hacks, so in case it does mess something up, i wont have to rewrite everything to fix it.)

now all we need is to kill off the dinosaurs and we’ll be all set.

moonshine skin finished

now you have no excuses for not using my skin on your desktop.

the skin has a clock with the background of the clock being the current phase of the moon. the skin works on both light and dark backgrounds, and is super easy (no editing required) to install. so there ya go, no excuses.

you can still download rainmeter from rainy’s site: download
and you can get my new skin from here: download

here is a preview image of the clock

moonlite skin images

i recieved an e-mail from jer, who downloaded my moonlite skin, and he had updated the images to work on both light and dark backgrounds as well as increase the size and add a nice gloss over the front and a shadow.

when i first saw it it blew me away. it looks so good. it will be added to the zip file as soon as i get a chance, but it will be worth it.

i’ll keep you posted here.

sample image:

election day aggravation

well…   it’s official…  Utah politics sucks my ass. I can’t believe that that many people are willing to throw away the rights of other people based on the sole fact that thier (the other people) way of life makes them (the stupid ones) uncomfortable.

election day was yesterday and on the ballot was a constitutional amendment (#3) that changed the definition of marraige to being the union of a man and a woman. it also took away the rights of any other such union. here is the actual text of that ammendment:

(1) Marriage consists only of the legal union between a man and a woman.
(2) No other domestic union, however denominated, may be recognized as a marriage or given the same or substantially equivalent legal effect.

now, the first part in itself is severly fucked up. why?  because. who are we to say that two people who aren’t a man and woman can’t get married?  why does it make you so uncomfortable?  and why do you think that by taking away thier rights it’s going to make you feel better about yourself?  i mean, while we’re at it, why don’t we take away women’s rights, and the rights of blacks, too?  what makes a gay marraige so threataning?  is it the fact that some book says it’s a sin and therefore it must be true?  or is it something to do with the safety of children?  because lord knows that gay people can’t love a child the way straight people can *end sarcasm*.
the second part of this little two line atrosity is even worse. look at it closely. it takes away the rights of common law marraiges, for ALL PEOPLE, not just same sex couples, who now, by law, can’t get married, visit each other in the hospital, make desicions in times of emergency, and determine what is best for the person with whom they’ve shared their whole life and love with because a single sentence that just got added to the utah constitution says so. how fucked up is that?
and don’t even get me started on the damn presidential election. i mean, if i hear one more person say they hate bush, AND THEN NOT VOTE FOR KERRY?!!  wtf?  i hear it all over the place… that bush is stupid and bush is lame, and bush sucks at this and bush sucks at that…  blah blah blah…  well, you just had your chance to fix it and what did you do?  sat on your ass and moaned about it. i voted. but only two of the things i voted for passed because the rest of the people in this closed-minded, bigoted state can’t see past thier own narrow feelings.

*end venting*

sorry about that, i’m just so frustrated, and it’s not just utah, like 12 states passed similar amendments. i mean, seriously.

— insert huge topic change here —

so…  i got engaged a little while ago, kinda excited, kinda nervous, kinda swamped with school, work, and now planning for a wedding (ok, not really ‘planning’, but saying ‘okay, sure’ to ideas my fiance throws out).  it’s not like i’m super stressed right now, but there are times when i’m not quite sure where to start and it gets to me a little bit.

also just got back from disneyland where my niece had her fourth birthday, got to hang out with my sister, and my niece for a day while at California Adventure, which is way cool. Tower of Terror is awesome, i recommend it to anybody, except for you wussies out there.

i’m also working on the new corporate intranet and public site for EGI, which is pretty dang huge for a guy who only designs websites as a hobby. the site uses ColdFusion, which is a server side script not unlike php and perl. although it does have its pros and cons. pro is its simplicity, theres no distinguising between the code and the html while coding, the code merely consists of specific html ‘tags’ (for instance <cfif> </cfif>), but because of it’s simplicity, it’s also a little harder to do complex things without a superfluous amount of code.

i also designed a site for a friend of mine (soon to be brother-in-law through two marriages) at www.photmillard.com.  i really like the way the site turned out for him, i’m actually quite proud of it. it’s simple, but the backend is custom coded in php to select a different random picture from each of the various photo albums and display it as a rollover on the main page every time it is refreshed. i also re-skinned the photo album that he uses (the same php script as mine), and created all new graphics, edited css, and code.

anywho…   it’s been a while, sorry to keep everybody in the dark about what’s going on, but i been busy.
plur, lates

p.s.- you may also notice (if you frequent my blog) that the look (and script) has changed, i was forced to do this by some weinie that kept comment spamming my blog. why do people feel they have to be dickheads?  what happened to respect?

feel goods

i don’t know why, but i am so excited today…  it could be the airsoft game we’re playing tomorrow, or the party tomorrow night, or the sense of achievement i have at moddin the crap out of my board today…  i dunno, but it’s there.

i kinda like moddin my board, it’s fun, except when it doesn’t work. then it sucks, but today… it worked, so it’s good.

have a great day!  mine’s goin pretty dang good.

plur, peace-love-unity-respect (www.plur.com)