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.

Friday, July 11, 2008

We're all quadratics too

So let's do it as they do it in the quadratic formula.

Behold:

x = (-b +/-b2 - 4ac)/(2a)



Now Mathimoto's Complaint aims to cover a wide range of fans of math and today I'd like to reach out to the younger crowd. That precious younger crowd undoubtedly have seen the beauty of the quadric equation. But they and probably some older folks as well have never given an effort at deriving it. Well, I thought I'd give it a shot and show you the awesomeness of figuring out these formulas. Because Math rocks, it really does.

First start out with the generalized form of a basic quadratic equation (ie any equation with 1 variable (let's say x) and some instance of that variable raised to power 2 and possibly some instance of that variable raised to power 1. Okay, so it was harder to describe things rather than write it out, so let's do that)

Let a, b, and c be constants and x be a variable.

A basic general quadratic equation is:

ax2 + bx + c = 0


Now it helps then to know one particular quadratic equation, that is what happens when you have

(x + b)2 = 0

this can be expanded to

x2 + 2bx + b2 = 0



(Don't believe me, just use the distributive property of multiplication, ie,

(x+b)2 = (x + b)(x + b) =

x (x + b) + b (x + b) = x2 + bx + bx + b2 =

x2 + 2bx + b2

Ta-da)

Okay, now if you got a quadratic equation of the form

x2 + 2bx + b2 = 0


And you know

(x + b)2 = x2 + 2bx + b2

You can then say

(x + b)2 = 0

and with an equation like that, the only time you have a number that can match the value of x (and still give you 0, ie, the solution of the equation) is

x = -b


Back to the general basic quadratic equation:

ax2 + bx + c = 0


At this point we don't know how to find the solution value of x here, but since we know the solution for

(x + b)2

we can reconfigure our general equation to fit our particular equation. Just follow along.

If

ax2 + bx + c = 0

then we can play around with this, our goal equation doesn't have a c, so let's just subtract it from both sides.

ax2 + bx = -c

Well, our target equation doesn't have an &lsquot;a&rsquot; so let's get rid of the a by dividing it from both sides.

x2 + bx/a = -c/a

Okay let's remember our target equation (or the essentials of it)

(x + b)2 = x2 + 2bx + b2

now let's make a little pretending. Let's say instead that the b in our target equation is really say some other letter, say d. Then:

(x + d)2 = x2 + 2dx + d2

And if the current state of our manipulation of the general equation is:

x2 + bx/a = -c/a

we can get to our target a little easier if we say that

d = b/2a

alright now let's take it up a notch by throwing in the new d, then we get

x2 + 2dx = -c/a

well now all we need is the d2 and we can just add that to both sides, so:

x2 + 2dx + d2= -c/a + d2

Well, we can use our old target equation:

(x + d)2 = x2 + 2dx + d2

to simplify this:

(x + d)2= -c/a + d2

Now remember, with a situation like this, the name of the game is find the x, and currently our x is trapped in a term that's raised to a power, so let's get rid of that with a little friend called the square root (but remember that with real square roots you have a positive root and a negative root, since the negative goes away from the squaring).

x + d = +/-d2 - c/a

Now, now, now, we can FIND THE X (by subtracting d from each side)

x = -d +/-d2 - c/a

now just one more step to define the x in the a, b, c constants we started out with, just reverse the d insertion with our

d = b/2a

and we can get...

x = -b/2a +/-(b/2a)2 - c/a

so there we go, we've found the x, but it's kind of ugly so let's simplify things a little by doing some expansion and some common denominator and essentially simple algebra which I'm going to skim over a little:

x = (-b +/-b2 - 4ac)/(2a)



And there we go, we've got the quadratic formula! Yaaaah!!!! Behold it and be amazed!!!

x = (-b +/-b2 - 4ac)/(2a)



MATH RULES!!!! WOOOOO!!!!

Wednesday, July 9, 2008

Mathimoto's Revamp

As things have suggested Mathimoto is still doing changes of many types. First I have added good old Robo-Bobo as my partner, and now I'm doing some redesign of the layout and such. So prepare yourself, for awesomeness, brought forth through the power of MATH!!!

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!