Dec 11
28
I’m currently reviewing an existing system written in vb6 that management at the company I work for has finally decided to get behind porting it. Their plan is to port it to Visual Studio (VB.net) as that is what they are comfortable with. I understand this desire, but I’m also hesitant to jump right in and do so because they are also looking for “better ways to do things” during the transition. This particular system is very “rules driven” and we have a massive amount of code dedicated to supporting these rules. In my opinion this is just screaming for Prolog to be a part of the solution, and since I have some say in the matter I’ll be as neck deep in prolog over the next couple of months. I’ll be trying to get a proof of concept in place before the conversion gets underway so I can prove its value. Either that, or I might just prove that it won’t do the job I want it to and I will be able to dive into the rewrite as previously planned without hesitation or hinderance.
While I can’t tell you what the project is I can tell you that in just one of my fact databases I expect to have well over 1/2 million facts. The facts are relatively static so that’s good. The facts will be queried upon often over 1million times per day and it should be able to handle that without breaking a sweat as this is only about 5% of the total volume we expect to see.
So, that being said, I’m working on compiling a list of Prolog references (websites mainly) that will help me progress as quickly and painlessly as possible. If you have any suggestions for books I’d also love to hear them and will likely be adding them to the post or as seperate posts as I go.
So, here come my links on into topics:
http://boklm.eu/prolog/page_0.html
SWI-Prolog
A short Introduction to Prolog
A Short Tutorial On Prolog
Introduction to Prolog for Mathematicians
iProlog Programmer’s Manual
Prolog Tutorials
A Concise Introduction to Prolog
Dec 11
4
True in sports, business, and life in general:
IF you can keep your head when all about you
Are losing theirs and blaming it on you,
If you can trust yourself when all men doubt you,
But make allowance for their doubting too;
If you can wait and not be tired by waiting,
Or being lied about, don’t deal in lies,
Or being hated, don’t give way to hating,
And yet don’t look too good, nor talk too wise:If you can dream – and not make dreams your master;
If you can think – and not make thoughts your aim;
If you can meet with Triumph and Disaster
And treat those two impostors just the same;
If you can bear to hear the truth you’ve spoken
Twisted by knaves to make a trap for fools,
Or watch the things you gave your life to, broken,
And stoop and build ‘em up with worn-out tools:If you can make one heap of all your winnings
And risk it on one turn of pitch-and-toss,
And lose, and start again at your beginnings
And never breathe a word about your loss;
If you can force your heart and nerve and sinew
To serve your turn long after they are gone,
And so hold on when there is nothing in you
Except the Will which says to them: ‘Hold on!’If you can talk with crowds and keep your virtue,
‘ Or walk with Kings – nor lose the common touch,
if neither foes nor loving friends can hurt you,
If all men count with you, but none too much;
If you can fill the unforgiving minute
With sixty seconds’ worth of distance run,
Yours is the Earth and everything that’s in it,
And – which is more – you’ll be a Man, my son!
I got my iRobot looj “gutter robot” yesterday. I’ve been really looking forward to getting one for a while now and finally got it ordered late last week. Not bad for a delivery time! I think I ordered it on Thursday and received it tuesday with free shipping.
Include in the box were two batteries, a charging device, the robot itself including the remote, a beltclip, and two augers. It came in a nice tool case (like you might get with a cordless drill or other cordless power tools) that will allow me to store it neatly out of the way when I’m not using it so I’m liking that too.
I’m writing this because I read various reviews and some were good while others were not so much. I wanted to write it while it was fresh in my head (I just used it about 2 hours ago) because I remember thinking while I was using it that “man, I didn’t realize…” so I figured I’d give a heads up to anyone else looking to spend their money.
First, I want to say that I think this will make cleaning my gutters much safer. I hate getting up and down off the ladder. The way my house was built leaves me with what amounts to second story gutters and I just hate climbing up and down over and over again to clean them. The other option I had was to climb up on the roof and just crawl along the entire roof line on my hands and knees scraping out the gutters by hand. This required me to be way to close the edge contantl and made me really nervous on the steeper graded parts of the roof (which
also happened to be over the highest part of the roof directly over my stone patio). With this looj I was able to find one place that I could climb up, place the looj, and then let it do its thing to clean pretty much the entire gutter area on the back of my house.
It worked pretty well. The gutters got clean enough. I can honestly say that if I was paying a person to clean my gutters. I would require them to have done a better job as there was still some debris left when all was said and done, but probably 95% of it was able to be cleared by the looj. Keep in mind this is a rookie “driver” and I was in a bit of a hurry as I had to get back to work so it might have done even better if I knew what to do, but it worked pretty well regardless.
You do have to pay attention while you use it. You can’t just set it and forget it. For example, I did encounter a couple of times where the looj rolled over. Basically the auger got stuck in some mess that it wasn’t able to break up and so the robot itself just started spinning. It was amusing in a way, but not so much in that I had to go rescue it. It seemed that several times it just quit responding for a few seconds, but then it when right back to working. I don’t know if it got to the edge of the range of the remote or what… in any case it did not make the device unusable, just a little quirky.
I did have one downspout for which the auger never was able to clear out the opening. I had to climb up and clear that one downspout myself. This is still significantly less work than I normally have to do.
This first use was in gutters full of dry leaves, some acorns, and very few pine needles. It hadn’t rained for a couple of weeks so the leaves weren’t wet and the gutters weren’t wet. It took a few passes to get everything out. I plan to use it again soon after a rain (it will rain tonight and I don’t have time to do the front before the rain will be here) so I’ll be able to see which way works best. The second test will includes lots of pine needles so we’ll see how it actually handles them!
I do not think that this device will make my gutter cleaning faster. Working the looj back and forth to get it through heavier jams may actually make it take longer, but I do think it will make it much safer and require less physical exhertion on my behalf.
Cleaning the device for storage was super easy. I just turned on hose and rinsed the looj off. It was pretty “cruddy”, but nothing major and cleaned up quickly and easily.
If they make another model then I would recommend making it a little heavier (maybe 50%) and make the tread motors a little tougher.
I plan to do another review once I get a chance to try this on my gutter that has a pineneedle problem just to report on how that goes. For now though, I’m pretty darn satisfied with the value I received for the money I spent.
The below table is a description of iphone icons and ipad icons, what they’re sizes and should be, and what their standardized names are. This information is all over, but the a thorough and yet concise version (and what i based the below on) can be found here.
| Name | Size (pixels) | Platform |
| Icon.png | 57 x 57 | Universial application icon |
| Icon-settings.png | 29 x 29 | Universial application icon for settings area. Alternative name: Icon-Small.png |
| Icon~ipad.png | 72 x 72 | iPad application icon. Alternative name: Icon-72.png Add some smaller (iPad doc: 64×64, other optional 32×32, 24×24, 16×16) custom icons to your project. See comments. |
| Icon-spot~ipad.png | 50 x 50 | iPad icon for spotlight search. Alternative name: Icon-Small-50.png iPhone OS trims 1 pixel from each side and adds a drop shadow. The actual size is 48×48 pixels. |
| iTunesArtwork.png | 512 x 512 | Universial application icon for iTunes App Store. Uploaded separately to iTunes. It’s included in the app bundle too, file name: iTunesArtwork. In an iPad application iPhone OS uses this image to generate the large (320×320) document icon if it is not supplied otherwise. |
| Default.png | 320 (w) x 480 (h) | iPhone/iPod 2, 3 portrait launch image |
| Default@2x.png | 640 (w) x 960 (h) | iPhone 4 hi-res portrait launch image |
| Default~ipad.png | 768 (w) x 1004 (h) | iPad. Specifies the default portrait launch image. This image is used if a more specific image is not available. Use full size template (768×1024) to design this launch image. The 20 pixels height statusbar is on by default and occupies the top of the screen, aka the 1004 rows vs. 1024. |
| Optional icons and images: | ||
| Icon@2x.png | 114 x 114 | iPhone 4 hi-res application icon |
| Icon-settings@2x.png | 58 x 58 | iPhone 4 hi-res application icon for settings/search area |
| Icon-doc.png | 22 (w) x 29 (h) | Universial document icon |
| Icon-doc@2x.png | 44 (w) x 58 (h) | iPhone 4 hi-res document icon |
| Icon-doc~ipad.png | 64 x 64 | iPad document icon (small) |
| Icon-doc320~ipad.png | 320 x 320 | iPad document icon (large) |
| Background-xxx.png | 320 (w) x 480 (h) 640 (w) x 960 (h) 768 (w) x 1024 (h) |
iPhone/iPod Touch 2, 3 background image, iPhone 4 background image, full size iPad background image, full size. For most projects the status bar is hidden, so use full screen size by default. |
| Default-PortraitUpsideDown~ipad.png | 768 (w) x 1004 (h) | iPad. Specifies an upside-down portrait version of the launch image. The height of this image should be 1004 pixels and the width should be 768. This file takes precedence over the Default-Portrait.png image file for this specific orientation. |
| Default-LandscapeLeft~ipad.png | 1024 (w) x 748 (h) | iPad. Specifies a left-oriented landscape version of the launch image. The height of this image should be 748 pixels and the width should be 1024. This file takes precedence over the Default-Landscape.png image file for this specific orientation. |
| Default-LandscapeRight~ipad.png | 1024 (w) x 748 (h) | iPad. Specifies a right-oriented landscape version of the launch image. The height of this image should be 748 pixels and the width should be 1024. This file takes precedence over the Default-Landscape.png image file for this specific orientation. |
| Default-Portrait~ipad.png | 768 (w) x 1004 (h) | iPad. Specifies the generic portrait version of the launch image. The height of this image should be 1004 pixels and the width should be 768. This image is used for right side-up portrait orientations and takes precedence over the Default~ipad.png image file. If a Default-PortraitUpsideDown.png image file is not specified, this file is also used for upside-down portrait orientations as well. |
| Default-Landscape~ipad.png | 1024 (w) x 748 (h) | iPad. Specifies the generic landscape version of the launch image. The height of this image should be 748 pixels and the width should be 1024. If a Default-LandscapeLet.png or Default-LandscapeRight.png image file is not specified, this image is used instead. This image takes precedence over the Default.png image file. |
I have recently been working on a new iOS app for the iPhone and I ran into a couple of issues. I don’t really have time to go over them all in this post, but I did want to document one of them because I hear it can be a big deal as far as getting your app approved by Apple. The issue is that of making sure you handle things gracefully if the user’s phone is unable to connect to the internet and they try to do something that does require a connection.
The way I decided to handle it was to use the reachability collection provided by apple. I downloaded the reachability sample from Apple and then copied and imported the 4 files from the “classes” directory into my project.
Then I added the “SystemConfiguration.framework” to my project.
Now I have all of the prereqs for my solution. The next thing I did was I created a NetworkReachabilityTest class with NSObject as its base class. I added a single method called “isNetworkReachableWithAlert” that returned a bool and included one parameter. The parameter specified whether it should automatically pop up an alert box in case of a lack of network connectivity.
I chose to do it this way (as a dumb small class) so I didn’t have to copy the code for this method into every page. Plus it gives me the flexibility to easily reuse it in future projects. So now, before I do something that requires network connectivity I instantiate an instance of this class, I do the check, and if the connection is there I do the work. If the connection is not there I can bail out instead.
Here’s the code (some of this code was included in the example and some was found here around post 29 or 30:
-(BOOL) isNetworkReachableWithAlert:(BOOL)bshowalert
{
Reachability *r = [Reachability reachabilityWithHostName:@"www.signandtrade.com"];
NetworkStatus internetStatus = [r currentReachabilityStatus];
if ((internetStatus != ReachableViaWiFi) && (internetStatus != ReachableViaWWAN))
{
if (bshowalert)
{
UIAlertView *myAlert = [[UIAlertView alloc] initWithTitle:@”No Internet Connection” message:@”An internet connection via WiFi or cellular network is required for this portion of the app to work.” delegate:self cancelButtonTitle:@”Ok” otherButtonTitles:nil];
[myAlert show];
[myAlert release];
}
return NO;
}
return YES;
}
That’s in the implementation file of my simple class and it is basically the only thing there! And it does everything we need.
And here it is in use:
NetworkReachabilityTest *nrt = [[NetworkReachabilityTest alloc] init];
if ([nrt isNetworkReachableWithAlert:YES])
{
// logic that requires or includes web activity here
}
[nrt release];
Hope that helps. Hope it makes sense. Better ideas or improvements on it are welcome, I just wanted to give someone a simple example of something that I know works along with the steps I took to make it work.
I have an Mac OSx machine on which I have virtualbox installed. My most often used virtual client machine runs Windows XP. Almost everything works great, but I was having a lot of issues getting printing to work. I finally got everything figure out though and figured I’d write it up real quick. So here’s what I did.
The first thing I would recommend doing if you have a setup like mine is to find the driver for the printer that you need to print to. Why? Because the apple software that I point you to below will install a driver by default that technically works, but that makes everything you print come out super small. Actually, as I’m writing this is occurs to me that it may be because apple assumes an HP printer, but mine is an Epson. So maybe the default installed by the program provided by Apple will work “out of the box” for an HP printer… But I would still go ahead and get the correct driver for your printer first.
Then once you have the driver on the client then do the following (found this at virtualbox.org forum and quoted from here):
1) Shutdown the VirtualBox machine
2) Under Mac OS X
a) System Preferences, Print & Fax, Check “Share this printer on the network”
b) System Preferences, Sharing, Check “Printer Sharing” and Check the printer
3) VirtualBox machine, Network:
a) if only one adapter selected and it is attached as NAT [this is the default], then add Second adapter attached as Host-only Adapter, Name: vboxnet0
b) if the adapter is attached as Bridged Adapter, then do nothing (you have a reason to be Bridged?)
4) Start up the Vbox machine – let it adjust to added Network Adapter
a) Download and install from Apple “Bonjour Print Services for Windows” http://support.apple.com/kb/DL999
b) start Bonjour Printer Wizard and follow the menus
That wizard will allow you to print from the client using the printer on the host MacOSx machine. But that wasn’t it for me because Apple defaulted to an HP driver which caused the pages to print all tiny on my Epson. It was an easy fix though. I just had to go back and run the brand specific printer driver install (or manually change the printer driver for the printer added by the apple wizard) so that it would use the brand specific driver instead of the Apple default.
Sep 11
6
Because I’m lazy and use computers all over the place i decided to add the following search links for the hptouchpad. I still have a pending order with one company, but like to want to stay on the lookout.
BestBuy 32 gb and BestBuy 16 Gb
Lawson Electronix direct link to touchpad update page. And their twitter page.
At Ebay (search is for hp touchpad 32)
Aug 11
28
May 11
14
A while back I did a post about making sure that you lock down your wifi so that people do not do nefarious things on your connection and get you into trouble. Well, apparently that was not the best “legal” suggestion. Apparently, if your wifi is open and someone does something wrong then, well, it could have been anyone that was using your IP. But if your wifi is closed and something is done wrong (beginning at your IP address) then you are viewed as that much more likely to be the target of an investigation. Afterall, who could have been using your IP? Your wifi was closed!
According to the Electronic Frontier Foundation (EFF), keeping your router OPEN may offer more legal protection than having it closed.
If you run an open wireless network, you may be able to receive significant legal protection from Section 230 of the CDA (against civil and state criminal liability for what others publish through the service) and Section 512 of the DMCA (against copyright claims based on what others use the service for). While these protections are not complete, EFF regularly engages in impact litigation to help ensure that these laws offer as strong protection to network operators as possible.
The fact is that wireless router security is often viewed as something you just set up and then leave alone and it works to keep the bad guys off your line. However, wireless security is relatively weak and much of it can be broken. It won’t be long before the bad guys have access to your locked router and start making trouble. When they do, it will look like YOU are the one making trouble. On the one hand, you hate to give the bad guys a free ride, but on the other hand you would hate to get punished for what they do if they stole your ride and did something inappropriate with it.
I continue to go back and forth on this one. I have gone months with my router open, and then some time with it closed. I usually have to close it due to too much bandwidth being used. My netflix will start lagging (don’t mess with my Sarah Conner Chronicles!) or whatever and I know that someone is getting a little happy with my bandwidth.
It makes me nervous both ways to be honest. I have several houses with teenagers that live around me, all with wireless reach. Do I want them going to sites or performing illegal activities over my router? Nope. Do I want them using up all my bandwidth? Nope. Do I want to be nice and allow for free access? Yes. Do I want to have someone crack my WEP, gain access to my router, and then do unruly things so that it appears it was me? No way! So what I do? What would you do?
My plan is to in general go open wireless. Sometimes I’ll close the open access if I have bandwidth hogging issues and then I’ll open it back up once I think they’ve gotten the point. If you come around and don’t find an open network currently available don’t be discouraged. I have likely gone into non-sharing mode for a short time in order to get the bandwidth hogs to move along and will reopen for public use soon enough. Really, this isn’t much of a change. I like to provide a needed service, and I understand the need for open wireless points. Now that I see there are even legal “goodies” to go along with having it open I feel even better about the way I’ve operated historically and will continue to lean towards open, available wireless.
This is probably my shortest post ever, but if you’ve got some sort of idea you think Google might be interested in then you can share the idea with them using the following link.
http://www.google.com/support/contact/bin/request.py?hl=en&contact_type=bizdev&rd=1