One of my sites was Fark'ed today
New blogs that I have made
Been a long time since I rock and rolled
I have largely been using my LiveJournal page (stenz.livejournal.com) instead of this page as my journal. But I just finished something sufficiently dorky that it is likely better suited for here for a bit - then will later discuss it more in depth there and then also post up the source code to PerlMonks.
I have been trying to figure out how many possible game boards there are for the game Scrabble. It is a far from infinite number, but it is a huge ass number.
I figured, if given the competition dictionary, then you have a fixed pool of words that can be used, and therefore a solvable end number of possible boards that exist.
One could write a program that would just brute force its way through the entire board space and track what all of those boards are.
The problem is when to stop? How do you know when you have all of the possible boards?
It is easy to figure out how many possible boards there would be if you just tried every combination of tiles available on the board space. (there are 100 tiles and 255 spots on the board - that means you can do easy combinatorial math and see that there are something like 10^80 possible boards - that is off of the top of my head from another time I worked it out - that is not exact).
That number is huger than huge. But it is way larger than the real solution space, which is limited by the rules of the game, as well as the competition dictionary which determines that actual words and a limited set need to be formed, not just every combination of tiles on the board.
That should dramatically reduce the space that we are looking at - but by how much?
Well, I wrote some Perl code just now that looks at the competition dictionary. There are over 172K words in there.
I looked at it from the point of view of a blank board and the first starting move.
We know that the starting move is going to be 7 letters long or less.
That allows us to ignore more than 2 thirds of the possible words as our starting moves - down to over 50K possible words that we can start with.
This is a huge break - if that number were huge to start, it would only get huger real fast.
So from that first move, we know that it can be in the number of positions as it is long (a 2 letter word can be in 2 different positions, and a 7 letter word in 7 different positions on the board to start - at least one tile needs to start on the center tile of the board for those that don't know Scrabble).
From there, we look at each letter in the word and determine what words could be made to spawn off of there. If the same letter occurs more than once in a word, we still count the number of words available for it again since we are counting the probability space.
So we add each of those up and then we multiply that number by the number of letters in the word since there are that number of possible starting positions for the word.
So we iterate over the 50K+ words, and then see how many next possible spaces there are. We are one level deep.
To go more levels deep gets more complicated in the programming and the numbers involved start growing a lot - so I only ran it out one level just to see what sorts of numbers we were going to be expecting.
The number I got with the competition dictionary is 147,993,683,161 possible boards for the first two moves.
Things that aren't accounted for at this point:
1) I haven't looked to see what the cutoff for Perl's int is and when I will need to go to Math::BigInt - I presume fairly soon. The only reason that would be a worry is if that number that I got wasn't the real number and instead some overflow or rollover value.
2) I don't account for shifting off of the board. Technically we could start with a 7 letter word and after that use a 12 letter word that goes off the edge of the board - I don't check for that. Not to mention that also would defy the number of letters available to the second move at that time.
3) I don't watch the bag at all - this doesn't simulate real play. Similar to number 2 in that sense. That means that there might be 40 letter Zs on the board, but there should really be no more than 3 (1 allowed and then 2 blanks).
The issue at hand is do we care about the error words creeping in and throwing off the count?
If we can say that we don't care, then that is very good because we can save a huge amount of computation each turn and therefore crank through this quite quickly.
At first I thought it wouldn't matter - but as I write this I see it does matter.
I was thinking in a linear way - which is how us humans normally thing - but this is growing a non-linear way.
For every error that creeps in and is assumed to be a legit word, it is magnified by the possible moves of the start word - so up to 7 times the errors straight off - and then it will have its own children spawned off of itself - and none of those should count towards the total.
So while I initially thought it wasn't that big a deal if a few hundred thousand errors crept into the first one, it does matter because it adds many many more to the end total.
As a result, I am seeing that this code is a rough draft, but currently too large a number...
In the end, that is a good thing - we want this number as low as possible the whole time.
Both for brute forcing, but especially in terms of tracking the number of boards. Each board is a 255 char string - if there are billions of them (which it looks like there are going to be more like trillions at this point) - then can we really track that?
Say we wanted a database that had a table that was just "boards" - could we have trillions of rows? I'm guessing not, but I honestly don't know.
A database that could handle that would be very nice though since you could then have a massively distributed effort to brute force the boards and have the boards submitted and tracked.
This adds in the issue of error checking the incoming data to see if there are the proper number of tiles and the like.
Anyway, this is the first step in all of that.
I'm hoping the addition of error checking code in my Perl script will allow me to get that number down in the millions - but I'm suspecting it will remain in the billions for now - which worries me for later growth.
At least we know that we will only approach the 10^80 figure but never reach it by a long shot.
Do you want to find alligator cowboy boots that they just...
...put on sale?
Polyester Bride by Liz Phair (sp?)
She is a cutie.
I am starting to learn interesting things about fractal analysis of the stock market. Not the Brownian motion stuff fully, but along the same lines. geometric instead of cumulative sum stuff.
According to my code, which I have yet to optimize (or more importantly check for massive bugs), it says that for the ideal 10 stock portfolio out of the thousands of stocks that it has access to in my database, the following were the best:
ESS, MED, PNP, GV, MGA, MRGE, TRO, NVEC, CTSH, and INKP
(I wouldn't bother looking at these in the short term - this particular code doesn't look too much at short term bubbles - so more like a year out)
The ideal management would be to watch them during intraday trading and manipulate how much you own of each so that it remains as 10% of each.
That is hard to do without either only doing that all day, or using an automated system to do it for you.
The second way of doing it, and easier to maintain is to wait N days and then reconfigure it (so that you have equal parts of each - normalize it and redistribute).
For a portfolio of 10 stocks, the shortest time that you can wait is about a year.
So you choose any 10 stocks right now - my code suggests these as having the current highest likelihood to give you good returns from what it knows of them.
Put your X dollars into them, wait a year, look at what you have an reallocate them to even out.
If you want to come very close to or perhaps beat the indexes, then you can just spread it evenly to start and each time you go around (yearly in this case).
Were you to be changing it constantly, during intraday trading, then there are fixed formulas for calculating how much of each - or you can still do fairly well with just the even distribution.
My current stock database lends itself well to this analysis since you need at least 2500 days of data to get a pretty accurate end result from the code - and my current database is largely focused on at least that much data (if not more).
That said, I always want to increase the size of the database and the stocks available to me and therefore see if there are more possible stocks out there that would possible be better.
The issues with the larger database of stock are increased rate of problems. Stocks delist and my current system doesn't handle that very well. And it slows things down with each new stock.
If anything, I should probably focus on paring it down - but that is a hard thing to do (to a point).
tomorrow is my last day of work before my vacation for the rest of the month. I got a raise and a bonus today, nice things and higher than I had expected - especially since I hadn't been expecting anything.
I done created a live journal
I created a live journal.
while I will still read slashdot, I will likely not keep a journal on here any more and instead do so on the live journal.
I had an epiphany on the toilet yesterday
I was going to the bathroom at work and I'm the first to admit that there are a few places where all of my good ideas come to me, and they are all when I'd otherwise be ragingly bored if my mind didn't wander the way it does:
1) college classes - I don't have those anymore, but those were great times for my mind to check out and think of other stuff
2) reading a book - this is unfortunate since it slows me down in actually reading the book when my mind wanders off
3) sitting on the toilet
4) taking a shower
5) falling to sleep
6) commute (usually the commute home - the commute in is more focused on getting there fast, weaving in and out of traffic (I'm on a scooter) and not getting killed)
7) long run and/or walk (I try to avoid walking anywhere when possible - I'm not lazy - in fact I'm quite athletic, I just get too bored walking - as a result, my mind wanders)
Anyway, all of that aside, my eureka moment was when I was thinking through the correlation of the proof that a meandering river is non-random via its relation to Pi, and the price movement of a given stock over time.
I then thought of a way to use that to predict stock movement.
I was both overjoyed with something new to grind on, but saddened that if I tell people about it, they will first blurt out something about the movie Pi since he was looking for a pattern in the stock market via Pi... that was simply a narrative tool and off base.
This on the other hand is 100% valid - in theory.
That said, the more I think about it, the more I think that I can either disprove it, or show that it is no better than just looking at a chart with a certain type of line drawn over it.
That said, I am still going to program it out to see what I can find of it.
This is the sort of stuff I wish I had someone to talk to about it - but largely speaking, either nobody gets it, or nobody cares. To assume the former I think gives me too much credit.
On a side note, I'm signing up for LiveJournal and will be integrating it with an update to my website that I will do starting on Dec 18th (I have off from the 18th until early January so as to use up all of my vacation days that I hadn't used previously).
I'm thinking I will actually pay them $25 for a year of their service. Ever since I got this Mac, I've been paying for everything. I don't know if that is good or not. I guess it is good to those getting the money - Proteus, Pith Helmet, charities, and LiveJournal... okay, I guess that really isn't that much.
I've found religion
Those men and women that create that should be worshipped as gods. That is my new religion - we have one of those (the larger office version, not the personal addict version) in the office, as did my previous employer.
As a bonus, it is also apparently bad on the environment since the little K-cups aren't recyclable. They burn everything here anyway... well, not everything - witches they drown. But trash gets burned.
We know that HP, Coke, iTunes, WalMart (or was it KMart), MusicMatch, etc are trying to do online downloads of songs. You pay $N and then get N songs - instant gratification.
The annoying part is that they are all competing for the same customer base. In the process of this, they approach XYZ record label and make deals to that they can get content to distribute. They also sign exclusivity deals, so that means a song/album/discography by band ABC (just an example, not necessarily the young wunderkind Another Bad Creation) may only be on one service.
Because of this, you have to go to iTunes to get your fix for one band, Napster for another, and then maybe the Coke store for yet another - each having their own interface.
Much in the same way that a few open source P2P clients have combined the background processes of several sharing protocols and server groups, it would seem that it would be possible and/or desirable to do the same for the online music purchasing world.
Or in the way that Proteus on Mac and Trillian on Windows have made a client that can use all of the chat platforms.
You would either have a web page or a client that would keep track of your various user ids, and then you could enter a search in one place, and it would then turn up the hits on the various services that you have a login on.
Then you could see that only iTunes carries XYZ, but 3 of them carry ABC and Napster has the best price.
Sort of like Pricewatch, but for the online music downloads.
The issues would be that they likely use their own proprietary communications protocol - even though in the end it is just queries into databases and links to correlate to those and then end data.
Also, on an unrelated note - I saw an incredibly hot girl at lunch today. Either it was Claire Forlani, or someone that looked exactly like her. Not sure how tall she was (aside from shorter than me), and I couldn't tell if she had a Brit accent or not. Otherwise I would say that it had to be her.
Just got an iPod for my fiancee
I went out and bought a 20gig iPod for my fiancee. Here it cost me $630. It comes with a 1 year warrantee on it, but since they have that known 18 month battery issue, I upgraded it to a 2 year warrantee for $90 more. Lots of money.
If she doesn't like it, I will sure as hell use it, but it isn't intended to be the type of gift where you get it for someone in the hopes that you will get to use it.
Maybe after this she will decide to get me the phone that I want - my previous hints that I wanted it resulted in her making fun of me since I hate using the phone. Which is a valid point.
My head hurts, my heart is racing, I have to pee.
No it isn't love, but perhaps even better - I've ingested a whole bunch of coffee today.
I think I must have gotten rid of my caffeine mug that I got off of Thinkgeek when I moved here, so I no longer have that and am just using one of the ones here in the office.
I think I had at least 5 cups of coffee today.
With the resultant brain jar, the name "tranquility" popped into my head - I'm pretty sure that is the name of the OpenGL game that I was agonizing over last night.
mentally flailing and grasping
I hate this feeling. I know it is in my head, the proverbial tip of the tongue moment. I hate the feeling.
I recall reading about a game that was posted on Slashdot within the past 2 years. It was less of a game than it is just a diversion - a relaxing one.
It used OpenGL and would take blocks and color them and then move them about in virtual 3D space and your movement would then influence how it behaved.
I even remember seeing a journal post recently when I first got my Mac. I did a search about something... and I don't know what. I was reading through the results and someone spoke of putting this program on their machine and it ran well.
Perhaps I searched for the new powerbooks.
I know that Enlightenment is a window manager under Linux, so that isn't the name - but it is something like that.
The name Clarity also has weight - but I also know that isn't it.
Something along those lines though.
It is free.
I have used all of that information and looked on Sourceforge, Slashdot, and Google to try to find this game. No luck.
I will try doing the powerbook search on Slashdot to see if I can stumble on it again.
Phone dillemmas - what a nice life.
The fact that the only real dilemma in my life right now is that I want to get this phone, and regardless of the costs available to me, I can afford them all - this reminds me that my life is pretty damn easy. It is just a matter of whether I want to pay less and wait, or pay more and have it right now in my grubby little hands. Any complaints I have are pretty meaningless in my life right now. I am healthy, I live in a nice place, and I can afford everything that I need.
Now I am to the point where the things that bug me and that I can't afford are all superficial luxury things.
When once gets to this state, it is usually when things like eating disorders, body dysmorphia, depression, etc set in - those are all disorders of having your needs met.
If you didn't have your needs met, you would be too focused on basic survival to have time for odd things to creep into your mind - like whether or not people can see your nose hairs and what impact on the moment that has.
So anyway, the issue, without further analysis is that I have this new Mac. I have a phone. The phone works just dandy as it is now, and the Mac works well enough for now (even though I "upgraded" to a development Java package and broke a bunch of the apps on here - fortunately the only way to fix it is to reinstall the OS).
So of course I want to go and mess with all of that by getting a new phone - one that has the magical and mystical Bluetooth.
I have the Nokia 8890. I paid some stupidly high price for it, I would say probably around $500 - all the more obscene since less than a year before that I bought two other phones, one of them being a $500 Nokia 8860.
That was in the year 2000 - so this phone has served me well and I got much more use for the money out of it compared to the other phones (although since they have resale value, you can still recoup a large portion of their value).
I want the Sony/Ericsson T616 (I have AT&T here). It even has a camera in it.
I had looked in the stores here before and they didn't have the T616. But today, while out and about running errands, I saw it in the phone shop. I popped in and asked him much it is - they said what I thought was $415, but then she repeated it loudly and slowly a single digit at a time since I am obviously retarded 4-5-0!
The $35 difference didn't matter too much to me. I was taken back by the digit on the far left side, not the other two.
In the States, I can get it for around $270 on Ebay. I can get it for around $220 on Amazon after a $100 rebate. The issue with the rebate is that it is not an instant rebate, and getting that thing to me is going to be a hassle.
Also, anything I buy in the States and have sent here will take a long time to get here (even feasibly get lost), and it will cost me at least 22% duty to get through customs.
So do I pay over $100 less, and then wait what could be on the order of a month or more to get this item? Or do I pay the $100+ extra, but I get it whenever I want?
At the moment, I'm leaning towards the latter. I am normally a pretty frugal person and will try to find the cheaper or at least most cost effective way of doing something (taking into account quality).
But in this case, I think speed of access to the item and least hassle factor might win out.
I am going to drop some hints to my fiancee about it and I might get it for XMas or my birthday which are both coming up.
If not, after that, I will buy it for myself.
Then I am going to make a web walking tour of parts of Bermuda (mainly the city of Hamilton near my office), among other useless things with the phone.
Perhaps also some collages - take 100 pics and then use photoshop to edit them into big old panoramic fun deals.
Also, I am taking pics of the games of Scrabble that I play - eventually want to tie that into a few more ideas I have for my website.
just need to make it to the 18th of this month
I am taking the rest of the month, starting on the 18th. I will have time to sleep, read, work on projects, and most importantly, goof off.
I have a user here that is a consultant. I'm not really sure where his core skills reside, but they aren't in computers. He is retarded with computers. He calls me more than anyone in the office, and he isn't even technically part of our office.
He needed to use HushMail, which is a secure mail system. He didn't like that he had to login. I tried to explain to him that part of the process of a secure server is that there will be added layers of security. He didn't get it.
Today he called up and asked if the server was down. I told him nope, it was indeed not. He then asked why he was getting some message telling him his username wasn't working - I asked him if that was his username on our server... nope.
This man is brilliant. He also wastes a lot of our network bandwidth.
Milestones I will be excited for:
1) This jackass leaves to some other office.
2) My vacation at the end of the month.
3) When I leave to another company or my own company is off and running with no hitches.
I am reading Fermat's Enigma right now and quite enjoying it. Next after that, going to read Confederacy of Dunces.
Went and saw Love Actually last night. Next movies I want to rent are Boondock Saints and The Salton Sea.
That's about it.
But the monkey paw is cursed
I have a new Mac, and I like it - even love it - YAY!
But the web browser and Java performance are related and unfortunately that performance is very very bad - DOH!
But I downloaded a developer release of a newer JVM and it seems to help the Java/Safari issues - YAY!
But then I found that there is no Komodo for Mac OS X and got an e-mail from them saying that they will in fact not even bother trying to make one - DOH!
But then I found that there is an Eclipse plug-in called EPIC that allows pretty much the same functionality as Komodo - YAY!
But then I found out that Eclipse 2.x is ungodly slow on Mac OS X - DOH!
But then I found out that Eclipse 3.x is much much faster - YAY!
But then I found out that Eclipse 3.x and the new JVM update that I downloaded don't seem to be compatible with each other and I just get a terminated error code of 255 - DOH!!!!!
Going to see Love Actually again tonight - I saw it in NC over my vacation and really enjoyed it.
My vacation was sad seeing my grandmother not doing well both physically and mentally - it is sad to see people going downhill that way.
I was also not terribly thrilled being back in America, land of the fat, the stupid, and the SUV.
I couldn't even be a great consumer like I wanted to be - nobody would sell me a Sony/Ericsson T616 without service - so I guess I will have to hit Ebay for that one.
I got a few DVDs, and picked up my GameBoy Scrabble game that I had bought off of EBay and they missent to my US address instead of here in Bermuda. The game sucked (even on the hardest opponent level it was easy to beat and it was slow). DOH.
Also got Jeopardy for PS2 - that too sucked (too easy and cumbersome to play) - DOH!
I have felt really alone here in Bermuda with no real physical friends and certainly nobody to talk intellectually with.
Then my mom told me that she had a friend that used to work for IBM and was into this and that - he sounded like exactly what I wanted - someone to just chat dork with.
So I'm gonna start that up soon hopefully.
Also decided to ask my college math profs a probability question that I can't quite wrap my head around to see if it is indeed hard, or if I'm just being daft.
Then in closing, I have come up with a scam that is morally wrong, and fairly solidly illegal too. But most of the scams that I have seen get caught and in trouble due to them being greedy and letting it run too long as they try to make lots of money.
I am going to try to run said scam just for a bit and then use the money to pay off my debts and then from there just quit and use my extra cash to invest.
My morals are a curvy spacial domain and in the case of this particular scam/scheme, they fall directly in an area that I never have any qualms abusing - the stupid and the religious.
I want a cube
Like I have recently said, I'm a new Mac fan - especially as of 10.3.
I will eventually need a desktop system - if not right now, certainly by the time I am back in the States (3 years or so, perhaps more, then I will be there for around 3 years).
I liked the G4 Cube when it came out the first time around, and I still like it. The thing just is a cool idea. But just the other day I found out that there are still upgrades available for it.
This has of course made me want one. You can go up to dual G4s, and soon someone will have figured out a way to put a G5 into one.
This is what I want - they are cool little things and about my level of willingness to fiddle with something.
I have a friend in the States that was willing to sell me his cheap, and there are still plenty of them on Ebay - so I will start looking into this.
I don't really have any desk space at home right now, but if we move, then I will be sure to setup an area for it and then get a screen - I could just slowly collect parts for it now.
I am going back to the States for Thanksgiving - I leave on Tuesday around 1:30 here - going into Philly and then layover there and then onto Raleigh from there where I will get a ride to Cary.
There used to be a direct flight from Bermuda into Raleigh, but that stopped and now I have to either through Philly, Athlanta, NYC, or Boston.
I'm not terribly thrilled that I will be going to the States around a holiday, but this might be the last time I see my grandmother - she is not doing well.
I will have a busy day at work tomorrow and then no work again until the next Monday.
I was hoping that during my layovers that I would have wireless access - I looked on the net and sure enough, the Philly airport installed 802.11b in all of the terminals (seems a bit odd that they would do the slowest at first).
I was thrilled to see that - but then I saw that it isn't free, it is $9.99.
That gives you access for 24 hours, and I will have to see how long my layovers are - if they are over an hour, I will most certainly want wireless access.
I have decided to join SourceForge and see if I can work on a project with this new PowerBook that I have. I haven't looked yet how to get source off of there yet - feel pretty stupid since it isn't obvious to me - I'm assuming that it must be cvs.
Slashdot is totally bug free. Totally.
I have 3 sidebars on the main page. Developers, Science, and Apple.
The Developer box tells me that my headline reader has been banned.
Excellent - their own reader has been banned - well done.
I installed Proteus as my chat program today - very cool - still getting used to some of it, but I like it.
I've decided to get a Sony/Ericsson T616 and if the display is that bad on it, I will upgrade just the display to one from a T630 (can just get one off EBay or something).
The T616 is better looking IMO and is cheaper.
Will still likely hold off until January to bother with that - although if I get one soon from Amazon, then I can get it for $219, which is cheaper than EBay.
This morning I woke up to find that the water in my house is... well, gone. That can't be good. So no shower for me - this reminds me of when we had the hurricane and were without power for a week. Except I do have power and it is one day.
I imagine that this is what it feels like to be French.
It does make my hair look quite trendy - Eurohawk.
I am not sure if I feel like working out tonight - I have been staying up late programming and then after that reading The Demon in the Freezer by Richard Preston and it is quite good.
But then I'm tired all day from lack of sleep, then I drink a lot of Coke, and then I pee a lot, and then I'm dehydrated - it is then hard to workout.
Going out to dinner tonight.
We are consolidating our office space and as a result there is much moving of computers and annoyances that will be going down soon - and I'm gone all next week (well, Tuesday on), so this will be interesting.
oh well - going home soon.
you're my obsession
Okay, well, not *you* so much - but more like the new T630 Sony/Ericsson phone.
I want that. Fortunately it doesn't come out for a bit, so that explains my inability to find it on Ebay. I thought maybe it was just impossible to find.
Today one of the owners here had me show him how to download mp3s and how it worked.
He said "wait, so this is going out on the internet?"
How the fuck else would it work retard?
Safari eats major balls if you ever open a Java Applet. I tried to quit out of Safari after it was starting its death spiral after running Java and it sat there for well over 10 mins trying to quit while I went and ran errands.
I opened up the Application Monitor (becuase for some reason it was responding faster than my Terminal.app - as Safari was going down, it slowed the whole machine down - even though the CPU and RAM weren't showing as being heavily loaded in the AppMan) - and then I just force quit the Safari.
I am sleepy today.
today is a good day
I went for a run and have my runner's high going now.
I installed PithHelmet in Safari, that thing is fantastic - allows you to selectively block ads easily (without having to manuallly edit your hosts file, rerouting to your localhost - and I think it does it on a named basis, so that entirely servers aren't necessarily blocked).
Got color working in my Terminal.app for Gnu emacs - that is nice - still can't get it to work for ls, or for anything on the machine that I ssh into - but no biggie.
Just learned today or last night that M-/ will test for completion in code - didn't know that - there is a lot I don't know about emacs.
Terminal.app will let me click - I think option-click - on a spot in emacs and then it will move the cursor there - this means that my emacs is as XEmacs as I need it to be - it responds to the mouse for repositioning and does syntax coloring.
I am considering getting a P610 because of its Bluetooth and also thinking of using the camera on it to take pics for the address book as I meet people.
Going to try to see if they have them here, if not, I can get it without service from Amazon for $319 and then get $100 off with a rebate - that is cheaper than I can even find it on EBay.
I'm going to try to figure out soon how to download a project off of SourceForge and figure out XCode and how to do interface stuff for OS X.
Tonight is roast beef for dinner with the in-laws.