Showing posts with label Computer Science. Show all posts
Showing posts with label Computer Science. Show all posts

Wednesday, March 17, 2010

How did I get here? Really, how? Who and why as well

And the days go by and the water flowing underground...

ONCE IN A LIFETIME

And if you'd like to make sure that it's all the same as it ever was, here's the lyrics

But damn... it's weird... I really don't think I was going to be here. In fact, in high school I considered myself distinctly un-technical and was somewhat proud for bucking the Indian computer whiz stereotype (But then I decided to buy a stereo...). On the other hand my oldest brother's a tech whiz and I took a bunch of comp-sci classes and I also was involved with the Computer Club (which I tried to steer into a creating sentient artificial intelligence direction, but they said it was "unrealistic" and "delusional").

Still the comp-sci-y part of me always seemed a little less than the other parts and that my career would take me...

But what is a career? (let's look at webster..., though dude Webster, shiny-ness does not excuse a website so crowded with slow running js that it's barely usable (yeah I'm looking at you Mashable))


In a lot of ways, who I am, highly religious, writer-ly, and overall a jack-of-all-trades, hasn't changed much from my days as a 5-year old... but damn...

I guess a lot of my amazement at who I am now comes from 3 things:

  1. I went through a period where any prospect of the future seemed unrealistic since I thought death was imminent
  2. On occasion my imagination runs away with my ambition (but they never actually elope! I mean really!) and I have dreams of myself as widely read and respected and yet only a tiny bit older, if not younger
  3. Perhaps most importantly of all, it's the gestalt of it all. Even if I might imagine a bit of myself here or there, to imagine the whole of my being... can I even conceive of it? (I'm pretty sure actually that I can't).

But while there's certain romantics to my surprise, a greater significance maybe the lesson learned. That is to say, if I did not predict who I am now, will I be able to know what I will become. And thus "How did I get here?" begets "Where am I going?"


But actually I know the answer to that...


I'm going to see the King


So take it to your head, take it to your heart and remember Rand rocks.

Goodnight Folks!

And God Bless.

Wednesday, January 27, 2010

Because if you weren't supposed to abuse the api it wouldn't start with a

Of course, I mean really!

Let me say I have little sympathy with hackers from an ethical, sociological, or philosophical perspective (that's a gross exaggeration, I mean ewww, but to explicate the matter would be an even more gross waste of time)

But when it doesn't hurt, or waste people's time, or screw with peoples stuff, etc., why not tae things apart and then put them together in different ways so you can take it apart again, and so on, and so forth, and thus I decided to conduct a reflection upon the window object of javascript.

Since my sign off would be far too down at the bottom of the page let me sign off before the mark, because I can. So take it to your head, take it to your heart and remember Rand rocks. Goodnight Folks!

And God Bless.

Monday, January 25, 2010

Reflecting on the infinity of madness within the sanity of the sands of time

My creativity takes many forms, writing stories, poetry, essays, this blog, twitter feed, speculating on math, history, philosophy, etc. and so on.

And among the items I left out of that statement, or at least left implied was programming

My feelings toward programming have gone up and down, risen and fallen, but the one constant is... actually there's been no special constant to my feelings about programming, except perhaps my affection for C++.

But nowadays, perhaps because my work requires coding and the like, I find programming often coming to my head... to the point of disturbance.

Dun, dun, dun...!

Now the disturbance isn't because of a lack of creative potential in programming, though it is partially because of a lack of creative realization in my programming, but perhaps more strongly it is that programming can often involve very minute details that are ultimately useless... indenting lines of code, optimizing loops and recursions, rehashing solutions to old algorithms solved a million times over by smarter minds... and it's very easy for me to program and in that manner. That is in a manner which is mindless and emotionless and detail obsessed... well, truthfully obsession is a dear friend to any artist, but with me and programming I feel it perhaps comes a bit easier...

Counter-strike!

I could tell many strategies old and new about counteracting this feeling and that one, etc. leading to a triumphant reversal of fortunes, just over the horizon... and I will give you this one... to overcome the risk of tedium, numbness and insanity that programming risks, I do now fill my veins with the purpose of bringing out worth and polish to my often odd and weird programming experiments, or at the very least, and perhaps more humbly, at least sharing my programming experience, if not to share knowledge of programming, perhaps just knowledge of a man programming.

(Stay tuned for posts in this vein, or not, whichever I feel like or what you feel like wiht the staying tuned-ness and all, I mean all I'm saying is if you're all stressed out, maybe you shouldn't stay tuned, maybe you should just get some sleep... or maybe I should)

Now enjoy the very nice jamming of a warm-hearted code monkey, just like me

And if I cannot share a great algorithm, perhaps I can share the desire for a great algorithm, the artist's drive...perhaps... only God knows.

So take it to your head, take it to your heart and remember Rand rocks. Goodnight Folks!

And God Bless.

Sunday, November 22, 2009

Tech Note: Calender fix got to get fixed

So I'm no something of a calender fix, don't ask me why that's just how I role. And thus here's some code for an xhtml calendar, php-gened + with a custom start and a custom end:


$start=array(4,19,1986);
$day = 24*60*60;
$ts = mktime(0,0,0,$start[0],$start[1],$start[2]);
$ts -= date('w',$ts)*$day;
$doctype = DOMImplementation::createDocumentType("html",
"-//W3C//DTD XHTML 1.0 Strict//EN",
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd");
$doc = DOMImplementation::createDocument(null, 'html', $doctype);
$html=$doc->documentElement;
$head=$doc->createElement('head');
$head->appendChild($doc->createElement('title','Timeline'));
$style = $doc->createElement('style');
$style->setAttribute('type','text/css');
$styledata = '
table {
width: 100%;
}
table td {
width: 12%;
}
';
$style->appendChild($doc->createCDATASection($styledata));
$head->appendChild($style);
$html->appendChild($head);
$body=$doc->createElement('body');
$html->appendChild($body);

$table=$doc->createElement('table');
$body->appendChild($table);
$thead=$doc->createElement('thead');
$table->appendChild($thead);
$trow=$doc->createElement('tr');
$thead->appendChild($trow);
$trow->appendChild($doc->createElement('th','Sunday'));
$trow->appendChild($doc->createElement('th','Monday'));
$trow->appendChild($doc->createElement('th','Tuesday'));
$trow->appendChild($doc->createElement('th','Wednesday'));
$trow->appendChild($doc->createElement('th','Thursday'));
$trow->appendChild($doc->createElement('th','Friday'));
$trow->appendChild($doc->createElement('th','Saturday'));
$endtime=mktime();
$tbody = $doc->createElement('tbody');
$table->appendChild($tbody);
$trow=$doc->createElement('tr');
$td=$doc->createElement('td');
$h2=$doc->createElement('h2',date('F Y',$ts));
$td->appendChild($h2);
$td->setAttribute('colspan','7');
$trow->appendChild($td);
$tbody->appendChild($trow);
while($ts < $endtime) {
$trow=$doc->createElement('tr');
for($i=0; $i < 7; $i++) {
$td=$doc->createElement('td');
$td->appendChild($doc->createElement('h3',date('d',$ts)));
$trow->appendChild($td);
$pastday=$ts;
$ts+=$day;
if(date('d',$ts) $tbody->appendChild($trow);
$trow=$doc->createElement('tr');
$td=$doc->createElement('td');
$h2=$doc->createElement('h2',date('F Y',$ts));
$td->appendChild($h2);
$td->setAttribute('colspan','7');
$trow->appendChild($td);
$tbody->appendChild($trow);
$trow=$doc->createElement('tr');
for($j=0; $j < date('w',$ts);$j++) {
$td=$doc->createElement('td');
$trow->appendChild($td);
}
}
}
$tbody->appendChild($trow);
}
header('Content-Type: text/xml');
echo $doc->saveXML();
exit();


Is that the only way to do things?

No.

Is that the best way to do things?

Honestly probably not.

What would probably be the best is if I could bust out some awesome XPath and XSL 2.0 functions/elements - with the date-time/duration functions this would be trivial, so much so it would not make it to any trivia gameshow of any repute.

However, as your next trivia question - who's fighting this lameness - XQilla! Qilla on, dude, Qilla on.

So take it to your head, take it to your heart and remember Rand rocks. Goodnight Folks!

And God Bless.

Tuesday, October 20, 2009

Because the hand that feeds tastes good

Indeed!
Even when it's your own... But that's another story...
and here's Nine Inch Nails!!

And now for something completely different...

Twitter has been good to me, more or less. By providing a new platform for my largely nonsensical rants, twitter has been feeding followers and readers into the maw of my endless ambition, and on my end I have been mildly abusive to it. Not really, but pretending in that vein, I have mildly abused the twitter api to draw out and play with the vaguely relevant json data from my twitter feed and that of others.

What do I mean? Nothing really, I actually was going to write something quite meaningful today, but..

Anywho, these are some example twitter api calls:

http://twitter.com/statuses/[followers|friends|user_timeline]/[screen-name].[format (ie, xml, atom, json, etc.)]

in addition you can throw in GET arguments like page=# and count=# or callback=function for the json format in particular.

Thus to call the third page of therandshow twitter feed in json with 20 results per page and send it to a callback called karl do thus:

http://twitter.com/statuses/user_timeline/therandshow.json?count=20&page=3&callback=karl
(note: you must have already declared a function named karl to callback to, else the Karl's won't come home no matter how hard you call)

Now you might say to yourself: "Hey this seems vaguely useful, but how can I waste that usefulness while helping to strain twitter's resources until it's inevitable implosion?"

Glad you asked Jim, not so glad you asked Sally.

Here's a sample use (and let me credit jquery for making this example within the reach of my immense laziness), and by sample I mean something I did to kill time and decided to half-justify by putting onto the web - behold twitter results displayed by day!

Dun-dun-dun!!!


<html>
<head>
<title>Abusing Twitter Every Day</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<script type="text/javascript">
function twitterCallback2(twits) {
twittier = [{date:0,tweets:[]}];
j=0;

for(i=0; i < twits.length;i++) {
settable = new Date();
settable.setTime(Date.parse(twits[i].created_at));
if(twittier[j].date==0) {
twittier[j].date = settable;
twittier[j].tweets.push(twits[i]);
dte =Date(twittier[j].date);
}
else if(twittier[j].date.getDay()!=settable.getDay()) {
j++;
twittier.push({date:settable,tweets:[twits[i]]});
}
else {
twittier[j].tweets.push(twits[i]);
}
}
str="";
for(i=0; i < twittier.length;i++) {
str += "<div><h2>"+twittier[i].date+"</h2>";
for(j=0; j < twittier[i].tweets.length;j++) {
for(k in twittier[i].tweets[j]) {
if(k!='user') {
str+= "<p>"+k+" : "+twittier[i].tweets[j][k]+"</p>";
}
else {
/* if you want for some reason to also display the your own user object */
str+= "<p>"+k+" : "+twittier[i].tweets[j][k].toSource()+"</p>";

}
}
// str+= "<pre>"+twittier[i].tweets[j].toSource().replace(/,/g,",\n")+"</pre>";
}
str+= "</div>";
}
$("#holder").append(str);
}
</script>
</head>
<body>
<div id="holder">
</div>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/therandshow.json?count=100&page=1&callback=twitterCallback2"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/therandshow.json?count=100&page=2&callback=twitterCallback2"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/therandshow.json?count=100&page=3&callback=twitterCallback2"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/therandshow.json?count=100&page=4&callback=twitterCallback2"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/therandshow.json?count=100&page=5&callback=twitterCallback2"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/therandshow.json?count=100&page=6&callback=twitterCallback2"></script>
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/therandshow.json?count=100&page=7&callback=twitterCallback2"></script>
</body>
</html>



and so there it is. Rather random and vaguely cool, n'est pas? Just like my random evocation of my 3 years of middle school French.

So take it to your head, take it to your heart and remember Rand rocks. Goodnight Folks!

And God Bless.

Wednesday, September 9, 2009

Tech Notes: XLSX

A little tech note for those of us, who like me use Linux. One pain is that complicated Microsoft Office documents, like a complicated XSLX document that uses pivot tables, often get messed up even by the venerable OpenOffice Suite. A suprising solution is Gnumeric Spreadsheet which actually displays XLSX documents with no problem. Another surprise is that if you open a document in Gnumeric Spreadsheet and then save it as .ods, it actually comes out better if you open it straight with OpenOffice. One penalty though, you lose the macros. Overall though I have been surprisingly pleased with Gnumeric spreadsheet. Though I have my own issues with all the gnom-iness in the world, and especially with GNU Trolls (let me introduce the label gnoll for them, which I realize is a different fantasy creature, but perhaps that is the point, if it has not been used already), I must say, with some reluctance given a long-time use of OpenOffice, that I'll most likely be using Gnumeric spreadsheet for my spreadsheeting needs, at least when the content must be exchanged with Microsoft Office. I hope someday to come back to thee OpenOffice Spreadsheet, maybe once you beef up your compatibilities, or if perhaps, dare I hope, you see the truth and ditch Java to bathe in the glory of C++, where all good applications originate.

Saturday, June 13, 2009

Prithee, have thee heard of the Prism

I'm always caught in a bit of a dilemma upon my less serious posts, because I am Rand the Great and Glorious and thus deserve the treatment as such. But on the other hand, even the great and glorious can afford more scattered thoughts upon once and a while.

So then let me make a recommendation far removed from topics more normally dwelled upon. Often I have found myself with more than one account at a social networking site or the like and have been forced to choose which one to be logged in as at a certain time. The choice would infuriate me, and burn me to my soul. Sure I could use multiple browsers, but I like Firefox, and then I need to surf over to the site again. Seconds wasted, seconds!

However, now I find myself taking advantage of Firefox's Prism project. This project at its core, isolates a single webpage in a browser instance. At its most basic use, this is only slightly more useful than a bookmark. But there are some intriguing possibilities here. Firstly, you can put the links to the prism-ed site more places than a bookmarks menu, and more relevant to the previous paragraph, you can utilize the prism-ed site independently of other prism instances and of Firefox. Thus, you can be logged into TWO! instances of say Gmail or MySpace accounts at once TWO! TWO!

And while there are some cases where one is better than two, this is not one of them.

So Prism on Prism! Prism on!

Sunday, March 15, 2009

Cause sometimes computing ain't for tooling

So far in my uneven revival of The Rand Show, I have attempted to punch out a deep, lengthy post for each sitting. While an admirable ambition, such a goal not only deceases my willingness/ability to post, but it undermines the randomness that makes the Rand Show, well, just in a category of its own. With that in mind, I step aside from my usual ruminations to ruminate different-wise upon the software that I use. Because ultimately, though my soul waxes and wanes on the matter far too seriously, software is cool, and so thus let me share what I use:

OS:
Windows generally. Not really by preference, but it is the system that has a lot of software and that generally is pretty user-friendly. I used to be a Mac-fan, but nowadays Mac's are priced out of my range, and while I do have a Linux machine (Ubunutu by variety), that particular machine is unreliable at best, yet installing Linux on this computer would leave me without a Windows machine, which overall I guess would be bad, probably. To those actually thinking of making a decision about OS's, I'd recommend Linux, despite the hypocritical ring these words may take on, it does seem to me the superior system. I suppose as for me personally, I'm too fickle to give up the flexibility having both Windows and Linux on different machines allows, and I just have the misfortunate (less you think me melodramatic, it is but a slight, slight misfortune) of having Linux on the lesser computer.

Internet browser: A little bit of everything really. My browsers have over time covered the gambit. Since I've been using the inter-web since it's explosion, I was at a time well-acquainted with the Netscape Navigator, since then I have on occasion used Internet Explorer, but stayed mostly on the alternative brands, let me tell you why:
Surfing Speed: IE, due to its embeddedness does have a starting up edge over many of the alternatives and when it comes to rendering simple pages sometimes IE can squeak out a slightly smaller time, and sometimes those two factors make IE useful, but generally when it comes to rendering resource-rich pages, IE ain't the tops.


Web Development: Defenders might claim that IE's web page rendering model is not inferior to the W3C's standards. Honestly, I've had frustrations with both so I'm not going to judge. But the thing is, even if at points IE's model might be better, it is not consistent, and it changes from edition to edition. The result is a slowing of internet innovation and annoying number of man-hours lost to cross-browser compatibility. But let me qualify that. IE8 and even IE7 do reduce those flaws to some degree, and let it be known certainly, that NO ONE SHOULD BE USING IE6 ANYMORE. It makes web developers bleed!


Security: IE8 I will also admit does step up security a good bit. However, of major browsers out there it is still the most likely to attract cookies, spyware, and other annoyances. Part of this is popularity, but Internet Explorer is BY ITS NATURE, more hack-prone, if for no other reason, than for the fact that it is integrated into the Windows system, giving it access to resources no other browser has. And let me add a completely unverified point. I do believe IE has a less elegant design that makes features and cooperation with other programs more hap-hazard. But even if we ignore these somewhat vague theoretical points, history has shown Internet Explorer to be awful at preventing security holes, and painful in managing permissions. The current IE8 system is a good example, with its mind-numbingly grandular security options, and annoyingly strict default mode. Le sigh.


Let me leave IE-bashing to others, because others will happily oblige. Let me then cite the browsers I do use:
Firefox: No longer the fastest browser on the block, and a resource devouring behemoth, it is still incredibly featureful with an unmatched add-ons repository.
Safari: Safari is amazingly fast. Even on Windows. That said, I can't say too much more of its praises, because it does strike me as a bit minimalistic. I mean in theory there are a number of interesting features, but many, like DOM Inspector, are hidden away in the wetworks.
Chrome: Like Safari very fast, not as fast though. And not nearly as stable. The Google Chrome project is still developing, and it seems like someday it might be a worthy entry. The isolation of problematic processes I actually have found useful. Still, it's raw edges come out every now and then, and it's generally a 2nd or 3rd choice for page viewing.
Opera: There were once many closed-source browsers, now there are two Opera and IE. Opera was once a little known gem, but it has since gained a particular popular niche: The mobile world. Opera Mini is now the mobile phone browser of choice, and if I had a better phone, it likely would be my phone's browser of choice. Anywho, the desktop model is also very good, with a strong rendering speed near equal to Safari. It also has a nice sampling of features like a built in mail system. Yet though it is almost as fast as Safari and almost as featureful as Firefox, the almosts don't add up to a definitive win. Still, it is nice as a back-up browser.


Word Processor: I have used many word processors in my day, and my favorite remains the ClarisWorks suite, but since that doesn't exist any more and its replacement, Apppleworks, is Apple-only (as was Clarisworks for a while I believe, but back then I was Apple-only as well), I am forced to deal with lesser systems. It's hard for me to give an edge to Microsoft Word or OpenOffice, both have +'s and -'s, WordPerfect isn't too far behind either. But with all those systems I am constantly annoyed at how long it takes to load even the simplest levels of functionality. While I want to type, I don't want to wait 10 minutes to get started! To combat that I've started working with AbiWord, a nice light-weight word processor with almost comparable functionality, but sometimes I just go back to simple WordPad. Not because I like it, mind you, but because the field is so barren of quality.
Programmer's Editor: PSPad I must recommend. Outstanding program. So many text-highlighting options, a ton of indenting and editing tools. It just gives you everything you need as a programmer. Unfortunately, it is pretty buggy at times. If you have a big document it can slow, freeze, or crash with alarming regularity. It also has ceased to output proper Unicode documents for me, so I'm forced now to find another editor. Le sigh.


Others:
Well, I'm getting a bit long here, and I have more than enough material for another post on this sometime, but let me run down some also recommends:

  • GIMP-The freeware image editor of tons of options, but painfully slow loading

  • Inkscape-A freeware image editor of truly high-end editing, but painfully obtuse user interfaces

  • GCC-If you're a programmer, I'm afraid that's just the way to be

  • Thunderbird-Very user-friendly, much less quirk-prone than Outlook, and it's the word

  • XTrans-Because XSLT is coming you see

  • Spybot-Search and Destroy-The basic security utility all computers need.

  • Songbird - A surprising capable music player/music organizer with occasional less than surprising performance issues

  • VLC-If you want to play anything without issues, you want VLC




Well, if this seemed like an excursion in pointlessness, remember that I am Rand and I am awesome. Just keep that in mind and keep the above in mind when you need some software to scratch some particular itch, or if you just like cool and shiny new thingamaggers like me.

So take it to your head, take it to your heart, and remember Rand rocks. Goodnight Folks!

And God Bless.

Sunday, August 10, 2008

Robo Bobo and the Complaint

Well, people, such as myself and Mathimoto, have been insanely busy of late. Yet, occasionally time and space conspire that posting might be made.

So let me share with you one of the reasons I've been with the busy-ness, the web and its various technologies. Now while this sounds like a simple matter, it's actually insanely complicated. But I can give you a preview:

Now the essence of the web is run on servers, most notably Apache. There are other servers with various specialties, like Jaxer's Javascript-specialized server, and Microsoft, in its fierce insistence not to be compatible with anything else has its own server, Microsoft Server. However, all of these servers in the end run on your standard compiled languages, such as Java, C++, C, or Microsoft's C# (I mean there are other possibilities like Delphi (a variant of Object-Oriented Pascal) or something along those lines, but why would you do such a thing?)).

However, not everyone actually has a server, due to expense, complexity of set-up (the #1 limiting factor on web serving in my mind), and so there are alternatives, such as serving by the domain name company that gave you the domain name, or using a web app service such as Google App Engine. The upside is usually this is less money (usually), the downside is usually this is more complex (usually), and your choice of technologies is often limited, for example Google App Engine relies on Python.

Taking a step up from the server, you got the pages. This is what comes back after a request by a user. There's a variety of technologies out there, which fall into a couple categories. Mainly, the big two are CGI, where a http request (ie, a page URL) runs a script, in theory written in anything, but usually written in a scripting language, like Javascript, VBScript, Actionscript, Perl, or Python, XML/HTML pages, with possibly embedded scripts (like the first three of the CGI languages, PHP (although that can also be run for CGI)) (in a variety of forms like ASP (Active Server Pages), ASP.Net (a variant with more Microsoft-specialty tech), JSP (Java Server Pages), or JSF (Java Server Faces)). There's also a variety of media that could come back with the page, but that's a bit more than I care to get into, although I should note that Media and such is often best caught up with Actionscript in a whole Adobe Flash mesh-up, but that tech is proprietary and may cost the money.

And once you get the pages, sometimes there's more stuff going on, like client-side scripting languages, such as Javascript and Actionscript, sometimes there's Flash Players and stuff playing the media or something, and more there's also Java applet tech, Java web start up, and the like.

I'm sure there's more and more with more combinations. I mean some people like throwing in Groovy and Common Lisp into there, because they're insane. But the web's a complicated place, with complicated people and no one understands him but his woman...

A summary of a brief overview of web tech:

Sever-program: Apache, Jaxer, Microsoft Server, etc.
Written-in: C, C++, Java, C#, etc.

Returned Page: HTML, XML, media, image, PDF, txt, etc.
Produced-by: Javascript, Actionscript, VBScript, PHP, Python, etc.

Client-side: Browser-processing, Client-side script, Media
Produced-by:
Browsers written in C, C++, Java, C#, etc., primarily with the Geko (Mozilla) engine, Internet Explorer engine, or Opera engine
Client-side scripts in Javascript, Actionscript, etc. (based on DOM events, DOM model, SAX events, ah, my mind hurts too many techs!)

And the web keeps on trucking.

Wednesday, July 23, 2008

Or do it the sensible way: Top 5 tips

Since the last post was all about the potential madness of computer cleaning, I thought I might give some saner tips, indeed, here are the top 5 (as ranked by Robo-Bobo) more safe tips for cleaning your computer, chosen for the cleaner who wants a lighter touch:

1. GET A SPYWARE SCANNER!

(And don't just download the one that comes in a pop-up ad, those usually have spyware attached to them, there a couple legitimate free ones (most famously Spybot Search and Destroy), although they tend to be less effective than the more expensive ones (although they are free), but whenever you download free software GO TO THE COMPANY OR FOUNDATION'S HOMEPAGE. Many times malware will be bundled with free-ware, but well-respected foundations and companies tend to avoid that (with some exceptions like some music companies (cough, cough, Sony BMG), it's best also to search the web for info about anything you download before you put it on your computer.)

I personally use Webroot's Spyware Sweeper

2. GET A VIRUS SCANNER!

(Same warnings as with the spyware scanner, although the truth is virus scanners often have limited effectiveness once the virus is on your computer (especially since the scanner is usually the first target of the virus). However, the best virus scanners also give you warnings about when you're about to download, open, install or transfer virus-infected items (one of the reasons I like my current sweeper).)

I personally use Eset's Nod32

3. USE THE SCANNERS!

The scanners sometimes have some automatic warnings even without being used, but not scanning is just a waste of good software! And also your computer will get infected, oh yeah, that too. Doesn't matter if you think your safe or you think you have good computer practices, spyware (and to a lesser extent viruses), happen (in fact, if your spyware sweeper is turning up nothing constantly, that probably means that the sweeper is infected).

4. Clear privacy info off your browsers.

Companies, even ones that pledge to do no evil (I have mixed feelings about Google, especially now that a friend works there (shout-out to Jean Hsu!) and especially since I use a lot of google tech which alternately impresses and frustrates me, but that's another session), will attempt to track your web-habits. This is a fact of life. Moreover, sometimes companies (a more rare happening, but sometimes, especially with some of the more unscrupulous background checkers for employment) will go a little further and try to actually connect your real-world identity to what you do on the web and what you have on your computer. It sucks, but that's how the internet is. So go to Tools or Options or whatever, and clear your privacy data, including (actually, although by default this usually isn't selected, it is the most vulnerable area) cookies.

5. Clear out your "temp" and "temporary internet files" folders.

Most of this ought to have been cleaned out by clearing privacy data, but it usually isn't. Finding these folders is a bit tricky for newbies (I've been assuming Windows throughout, especially since most spyware and viruses are designed for Windows, but this particular matter is Windows-specific. I'm a newbie at Linux, and while I'm capable in Mac OS (and actually have a certain preference for it), it has been a while since I've cracked into the nitty-gritty of how to clean Macs (beyond the previous steps)).

Essentially this is what you must do:

First, you need to enable viewing hidden folders:
1. Open "My Computer" from the "Start" menu
2. Go to "Tools" (in the top menu bar)
3. Click on "Folder Options"
4. Click on "View"
5. Find the "Hidden Folders" folder in the scroll bar, click on it to open it, if it isn't opened already.
6. Click on "Show hidden files and folders"
7. Click "Apply" in the bottom right corner
8. Close the the "Folder Options" menu, now you should be able to see all your folders and files

Second, you need to go to the user profiles:
1. Open the "Local Disk (C:)" folder (I'm assuming your still in the "My Computer" window, if not, get back to it)
2. Open "Documents and Settings"

Third, for each of the profile folders, you need to do the temp file cleaning, but here's the essential pattern:
1. Open the profile folder (ie, the folder with the name of one of the profiles on your computer)
2. Open "Local Settings" (you may notice that this folder is semi-faded, that's because usually it's hidden)
3. Open "Temp"
4. Delete all the files in that folder (though do not delete the folder itself, it is a natural part of your computer, however if you mess up and do delete it, the folder should regenerate naturally)

(note sometimes you might not be able to delete some of these temp files, usually it will say file is being used. You should then try closing some applications and trying again, or trying again on a different day, but sometimes there will be files you just can't delete. Sometimes that is just a harmless fact of how your applications work, but often it signals that there are processes that you didn't start in the background which might be problematic)

5. Go back to "Local Settings"
6. Open "Temporary Internet Files"
7. Delete everything in that folder (same warnings as with the "Temp" folder
8. Repeat for each of the profiles

Now deleting these temp files can sometimes free up a huge amount of disk space, but even if it doesn't it makes your computer more secure. However, the files will naturally regenerate with time, so continue to get rid of them.

6. Don't accumulate junk it the first place

I know this was supposed to be top 5 cleaning tips, but here's a bonus tip, practice safe internet! Avoid downloads from sites you don't know or which have suspicious reputations (cough, cough Download.com). Don't accumulate excess software (and if you do, remove some via your control panel's Add/Remove Programs). Do not open emails from people you don't know (even if it says charity this, or job offer that). Do not click on links to sites you don't know or if you're in a suspicious site to start with.

(actually avoid suspicious sites in general, that means you free porn sites (if you must have porn, go to a legitimate porn company with a respectable (relatively) reputation (and no I'm not going to list any of those companies)

(the less reputable ones also have the ugly habit of taking over your browser, if this happens, go to the task manager (Ctrl-Alt-Del) and click on the process that matches your browser (say firefox.exe) and end it (actually this might not in Internet Explorer (I don't usually use it so I haven't tried), since IE is hard-wired into the Windows Operating System (in a rather monopolistic move, which if not illegal, is at least supremely a douche-move)))

(this is where I feel Apple's Safari Browser, despite its easy-of-use and speed, falls short of the Firefox Browser, since Firefox allows you to see where a link leads by just leaving the mouse over the link, whereas Safari (at least, last time I checked it out, which to be truthful was sometime ago, so updates may have changed things), does not. Internet Explorer also has this feature, but IE is so bug-ridden, so security-problematic, so violating-of-all-sensible-web-standards (although IE is getting better in this respect), that I don't even consider it as an alternative in web browser choices. However, Opera Browser is always a reliable second in my book to Firefox, although it is a bit feature-heavy with some unfamiliar-quirks for my taste, but it is a nice browser indeed.)

Anywho, the basic law of preventing junk from cluttering up and undermining the security of your computer is... be cautious and use common sense. There are a lot of tricky and hidden ways to attack a computer, but most malware goes through the front door, so shut it. Or in less-metaphorical terms, if there's some action which seems like it would make your computer vulnerable, DON'T DO IT!

And if you do do it anyways, well, don't blame a certain robotic koala for not warning you.

Cleaning out with Robo-Bobo

Now a little advice from Robo-Bobo: cleaning and maintaining your computer is the route of all madness. So easily can you delete some essential file. So easily can you completely and utterly ruin your perfectly good machine. That said, I periodically like to clean out my machine of all suspicious files and processes to kill any potential viruses and spyware. Why? Because I can.

But I'll admit I do so with care. The biggest guideline for cleaning with care is whenever you have a file or process (if you don't know what I'm talking about what I say process, press Ctrl - Alt - Del to get your task manager up and running and click on the processes tab. Basically this will show you all the stuff, the good, the bad, the necessary, that is running on your computer) you don't recognize DO NOT IMMEDIATELY DELETE IT!!! Just because you don't recognize it doesn't mean it's not supposed to be there, especially since many software vendors, including old Billy Gates's Microsoft, set up new processes and files in new versions.

So how to handle the cleaning then?

Search the web.

The beauty of the internet is that it can harness all the previous frustrations of computer users around the world. You search the web with just the name of the file and process and you should be able to get someone, somewhere, who was also wondering what that item was, and who probably posted that question on an internet forum or asked an expert or something like that, and then got an answer. (although there are some processes and items that still end up being mysterious)

But sometimes it's nice to avoid slogging through tons of forum results, and luckily there are a number of organized process and file identification databases, which usually have readable and search-friendly reports. My favorite is The Process Library, which gets high marks for presentation and understandability, however I'll admit it's not the most extensive of the databases out there. I've found Neuber Software has perhaps a broader selection of information, however, you're best off going directly to its Window Processes Index, since navigating between its product-centric main-pages is a bit unwieldy.

But sometimes you're going to have to search.

And sometimes you're going to have to call Dell, or HP, or some other company that you notice comes up a lot in the unanswered questions about a process or item and demand they explain what this process does (and be forewarned they will resist telling you and likely will try to get you to purchase their expensive customer-care packages).

But as I said before, cleaning a computer is the way of all madness, doing it with care does not change that fact.

Yet, fear of viruses, malware, spyware, and other unpleasantries, combined with an almost compulsive cheapness, compels some, like a certain robotic koala bear you know, to press onward nonetheless. And to those brave and foolhardy individuals, I have but two words:

Good Hunting.

Monday, July 7, 2008

Welcome now to the Robo-Bobo report

As said before, due to Mathimoto's insane busy-ness. I'm adding my two cents to things around here.

And as a robotic-kola bear, it's about time for me to get some talking time. Of course I'll make sure not to overstep on Mathimoto's property, but Robo-Bobo's in the house now and he's about to add a little razz-ma-tazz.

But first of all, as things go, since this is Mathimoto's Complaint, I'd like to add my own complaint.

How come we're using XML for everything nowadays. Now I'm not saying XML isn't great, I actually like it a lot. I'm not so crazy about XSL, but I think ideally you could use XSLT to turn XML to HTML and then pop in some CSS to cap things off (now XSL and XSLT might do things alone, but for real formatting you'd have to throw in XFO or whatever and that's just annoying and Robo-Bobo don't do annoying).

XML's a beautiful concept for data-display and manipulation, basically you mark-up everything with the category or purpose it has, and then you use different transformation and formatting technologies to set things up into a full display, but since the transformation and formatting are separate from the data you can write data down and then decide all that, or you can take data and use several different ways to display things.

However, at the core of it all, XML's a data mark-up language and all the technologies associated with it are data display tech.s. Even if you throw in scripting languages like PHP or Javascript you still have essentially a matter of data display, and currently that's all the web is set up for.

The data display could be dynamic or static, but data display is what the internet was designed for.

And that's not enough.

Because already we have word-processors, games, and all sorts of applications that are used on the web. However, since things are used to data-displays, all the applications must be bastardized into dynamic data collection and display sets. Now overall, GUI's can be pigeon-holed into data-displays (in fact, GUI's are essentially data-collection and displays, and especially if you added a few more features, basically all GUI's come easily be easily created through a XML/XSL/XSLT/HTML/CSS-like technology), but applications? Applications in the most abstract sense can be said to be data collection and display, but to really do things like that is really, really, really asinine.

It's time to say no more! I will not make applications in XML!

But of course I will, because honestly, I'm a bit of a moderate with internet-tech (despite my robotic kola-ness), and I have not the yet the skill or prestige to revolutionize the internet world by myself.

But I shouldn't have to!

Applications should be written in an application-manner, and they should exchange data in an application way. Java Server Pages and such are a little better since there we're actually using application tech, and XUL is a step in the right direction, but it is not enough!

There must be a revolution!

We must!

We must!

We must revolutionize the internet by making it application-friendly!

To me, nerds of Silicon-valley!

To me, Indian sweat-shop engineers!

To me, other people who do other stuff!

Come, let's change the internet, under the grand banner of...

ROBO-BOBO!!!

And so on...

Thursday, July 3, 2008

lots of change = good, net-wise at least

So good old Mathimoto has been going through some changes, and with these changes has come much busy-ness, but do not fret! The math continues, and indeed will improve...

For example, soon this blog will utilize the very useful technology of math markup languages. Which exactly, I'm not sure at the moment, but it will be done! And then you'll have nice little graphics here with all the equations and such.

But perhaps most dramatically, joining the crew will be segments by Mathimoto's good friend, a robot-man whose name escapes me at the moment (if he was a kill-bot I would be much scared by this development but fortunately he is not).

Now this blog was initially envisioned as a math blog above and beyond CS, but this is also a blog on the internet so it is natural that CS developments be of some concern. Yet do not fear, the math will not be enveloped, and to protect the math, Mathimoto's posts and his robot friend's will be kept separate. The math will go on!

Because Math rules!

Sunday, February 24, 2008

That's what I get for all that Scheming

So I know that I have sang the praises of Scheme in several posts now, but let me get to some of the downsides:

First of all, it's insane. No control structures. No local variables. THE MADNESS!!!

But more importantly for me, because it uses exact numbers (ie fractions), the numbers can quickly become to large for the interpreter to handle within reasonable amounts of time. In many cases having exact numbers is ideal for math, but when your using mathematical estimates based on numerical analysis that is iterated many, many times, well, things get ugly.

So I'm putting out this question: Does anyone know of a way to turn off exact numbers in Scheme. I realize that you can just use the function (inexact->exact num), but that only turns it off for one instance, what I'm looking for is a more general purpose off switch.

Because of this difficulty, for some of the more advanced numerical methods I'm handling I'm switching to OpenOffice Spreadsheet. It's not a perfect system, but if properly used the spreadsheet can be a mighty powerful tool of data manipulation.

And I shall also see if I can design functions that get around the inexact/exact difficulty even if it is with the inexact->exact function, because I dream, I dream of the day when once more I can Scheme.

Wednesday, February 13, 2008

Time keeps on Schemin'

So one thing I'm a little bit worried about with this blog is the temptation to turn it into a semi-computer science blog. I want to keep things well rooted in math here, because math is awesome. I mean computer science is cool and all, but math is awesome, and also I think there are more computer science blogs out there than math blogs.

Still, I'm dealing with a lot of numerical analysis stuff now, the line between math and computer science is a little bit blurry. Still, because this blog is mine, I'll walk that line.

And so in the interest of math, I will now reveal to you some really cool Scheme code (just to refresh your memories, I'm using Dr. Scheme, a free Scheme interpreter, and I've been consulting The Scheme Programming Language by R. Kent Dybvig for reference) I wrote to deal with numerical analysis problems. Many people have said that Scheme should not be used for numerical analysis hw, and they are right, but that's why it's ultra-cool when you get it right.

So here's some functions:

General method applier for numerical methods requiring iteration (for generating a list of the value at several different iterations, largely for hw purposes but also so you can look at how it is converging).

(define (applymthd method fun initx tol)
(
map (lambda (iter) (method fun initx tol iter)) '(1 5 10 20 50 100 1000)
)
)

So this obviously is a pretty rough function, but I can tweak it into shape and if I do, I'll pass it along.

Here's a cheeky little function for forward distance:

(define (fordist fun n)
(
(- (fun (+ n 1)) (fun n))
)
)

Here's a less cheeky function for Aiken's terms given a function:

(define (Aitkens fun n)

(- (fun n) (/ (expt (- (fun (+ n 1)) (fun n)) 2) (+ (fun (+ n 2)) (* -2 (fun (+ n 1))) (fun n))))

)

But moving on to more sizable methods, here's an implementation of Steffensen's method:

(define (Steffensens fun initx tol iter)
(if (< iter 1)
initx
(
if

(< (abs (/ (expt (- (fun initx) initx) 2) (+ (fun (fun initx)) (* -2 (fun initx)) initx))) tol)

(- initx (/ (expt (- (fun initx) initx) 2) (+ (fun (fun initx)) (* -2 (fun initx)) initx)))

(Steffensens fun
(- initx (/ (expt (- (fun initx) initx) 2) (+ (fun (fun initx)) (* -2 (fun initx)) initx)))
tol (- iter 1))
)
)
)

More stuff: An implementation of Fixed Point Iteration:

(define (fixedpnt fun initx tol iter)
(if (< iter 1)
initx
(if (< (abs (- (fun initx) initx)) tol)
(fun initx)
(fixedpnt fun (fun initx) tol (- iter 1))
)
)
)

So that's that for now. And I'd say that's a good chunk of stuff, so that's some Scheme, but really, it's all about how to deal with numerical analysis in a quick and painless fashion made slightly more insane by using Scheme instead of any number of more saner tools.

Friday, February 8, 2008

Why plan when you can scheme?

Let me make a pitch for programming in scheme for math purposes.

Why is Scheme good for programming numerical methods and other math brick and brack?

Because it is so gloriously insane!

Scheme is a language without local variables, without control structures, without global constants, it uses reverse-Polish notation (those crazy Poles!) run usually by an interpreter... basically to the layman, let me say that it makes no sense.

But the advantage to Scheme is it fits very well with the idea of constructing logical algorithms and basing your math around that. Scheme strips algorithms down to their basic components, the procedures, and doesn't allow you to go any further than that. There's a ruthlessness to this restriction and enough power in this limited space that you end up being able to do a lot of math stuff simply and in a manner which illuminates the heart of the algorithm.

But it remains insane.

That said here's a good Scheme implementation:

Dr. Scheme

And here's a good guide to the language (note the implementation and this guide are not related, so some aspects of the guide may not work with this implementation):

The Scheme Programming Language by Kent Dybvig

Now I don't want this math blog to go all computer sciency, but it must be admitted that comp. sci. has some math overlap, especially when it comes to doing programming to make math easier. So look out in the future for some bursts of code for math-based functions, most likely in Scheme.

Keep on Scheming!