JSTarski

June 22nd, 2007

Warning: Post is technical in scope, so brush up on Logic, First-order Logic (FOL), and quantifiers.

Last semester I was enrolled in Symbolic Logic, Philosophy U215, which is a pretty crazy class. It was pretty difficult for me to get my head around some of the topics. I’m unaware why they require the class, but it didn’t serve me the purpose it should have. If someone can provide me some insight about the class’s purpose please comment below. I hate to be ignorant so now that I reflect back on last semester I’m pretty infuriated I just let it pass.

The class used the book, “Language, Proof, and Logic” (LPL), from Stanford University. For the book they created a collection of programs. It’s pretty well designed even though there’s a few quirky things, but the biggest drawback is that it is Mac OS X and Windows dependent. LPL Software consists of four programs (descriptions taken from http://www-csli.stanford.edu/LPL/Info/):

  • Boole is an aid for creating truth-tables. It includes an option to automatically generate the columns of the truth-table, although this option is disabled in the earliest exercises. Boole can be used to check the truth-table, either as it is being built or when it is complete, and to assess sentences of first order logic.

    LPL - Boole

  • Fitch is a tool for building formal proofs in the format presented in LPL. The instant feedback that Fitch provides, in verifying each proof and marking steps that do not check out properly, makes it possible for students to correct and learn from their mistakes without the intervention of an instructor.

    LPL - Fitch

  • Tarski’s World is an environment in which students can evaluate sentences of first order logic. The students can create worlds, each of which consists of a chess-like board with blocks of various shapes and sizes positioned on it. Sentences are evaluated in the worlds, which can demonstrate counter-examples to the arguments presented in exercises.

    LPL - TW6 LPL - TW5

  • Submit is a very different application. It is used to send exercise files created in the other three applications to the Grade Grinder. There are currently two Grade Grinder servers, one at Stanford and one at Indiana University. Submit chooses one of the servers to connect to. The student must enter a Book Number, which can be found on the sleeve the CD came in, in order to use Submit. He or she must also enter their name and email address. The instructor’s name and email address are optional. After the Grade Grinder verifies the student’s Book Number, name, and email address, it receives the files. The files are graded and a grade report is sent out, by email, from the Grade Grinder to the student. If the student has chosen to submit to an instructor as well, the instructor’s name and email address are verified and an email is sent to him or her.

    LPL - Submit

It was pretty frustrating while taking the class because I had to run a VMware Virtual Machine of Windows XP in the background just to use it since I’m using Kubuntu [Edgy at the time] (if you cringed then you’re probably still mad that the GUI made it mainstream). I started thinking about alternatives and the first that came to mind was a complete rewrite in JavaScript. Instead of tackling the whole collection of apps, I decided to focus on Tarski’s World. I chose this app even though it is the only supported app using Wine, because when I complete it I can propose the Stanford professors to change their code or even use mine!

I wanted to learn advanced JavaScript anyway so the best way to learn is to work on a complex project. I started working on it and figuring out the software logic behind it. For the most part it was pretty simple. I’ve gotten moving shapes, shape “Inspector” configuration panel (shape type, size, and name), logical predicates (e.g. Dodec, Tet, Smaller, etc.), logical operators (and, or, not, conditional, bi-conditional, equal and not equal), and most of verify functionality.

I am having trouble, however, figuring out how to create quantifiers.

Best Buy XSS

June 18th, 2007

Wow, it’s been a long time. It’s been a few months in the summer and I’ll start working for Verizon Wireless soon which I’m pretty excited about! But they take forever for the background checks, I guess it’s necessary in the post-Cho/911 paranoia but still it’s such a hassle.

Anyway, I have been neglecting my responsibilities with this blog, I just reinstalled it and recovered all my posts. Now I’m going to do a major redesign, if anyone is great with Wordpress themes please comment below. I’m also looking at recoding the blog so that it’s more secure and better optimized for my server. Also, if anyone has any idea how to do that let me know as well. Recently, I’ve been reading Webapp security blogs (specifically: RSnake, Jeremiah, and 0×000000). Even more recent I’ve been keeping up with the search engines month of bugs by MustLive.

From these security gurus, I’ve been trying to audit several pages on the web with mild success. One time, however, I was just browsing the computer kiosks in my local Best Buy (by the way, they haven’t even secured their wireless networks and still allow their sample computers to access command prompt!) and I was trying to find a review of some product. Yet, they kept me closed within the Best Buy barriers so I figured let’s see how long this will stand. I just browsed a few pages and messed around with the inputs. Then suddenly I found a gaping hole (which I reported on 06/12/07) in Best Buy Business, if you go to the “Advanced Search” the “Search within results” field allows complete HTML as long as the first character is valid (I believe that would be a character).

Now this is huge considering that you could put like a “zombie” iFrame and then log all keys on that kiosk which they use for employee recruitment! Now capturing SSNs and all seemed fun, but then again the FBI doesn’t seem to be too friendly and I’m too benevolent for my own good.

This is unreported, I just found it about 10 seconds ago:
Another key hole I found is in their Rebate Tracker: If you state that you made a store purchase the Customer Service PIN also allows free reign HTML, but you have to feed the parameter, pinField, with the code since the text field is only 17 characters long. Ironically, I haven’t found this attack on their “Online store” choice for their “Order Number” field.

As a bonus, I’ll throw in [In]Secure Computing Database the URL parameter used to allow any HTML/Javascript as well. However, I think they took the link down since I reported this vulnerability (05/27/07 to the Service department and then 07/11/07 to the Webmaster).

I’ve purposely not included Proof of Concepts so go try it yourself :) Also, new policy: If there’s any security vulnerabilities with my blog please let me know in either comments or e-mail me.

Update: The Secure Computing Database refers to their whitelist database.

Writely’s future

August 3rd, 2006

With half of my posts about Writely, you would think I was working for them? No. Maybe, I’m obsessed with them? Well, only temporarily. Writely, since the end of last year, after they asked me to help them, became a platform to develop my coding talent. Without further ado, I bring to you the visionary convergence of Google-Writely. Many critics state that Writely is not a very feasible solution namely because it does not work at all if the person is offline. Early on, however, Writely began writing a P2P Word client for the PC. They later dropped the approach for the AJAX approach, an interesting move to gain many new users. Since not many people, if any, would download yet another notepad program. Now with Google marketing, they can turn that client into an interesting and “ground-shattering” AND “Microsoft-destroying” Google prodigy.

Now not only would individuals be able to edit on public machines, but also on an airplane. I assume, however, that they could also create a Word plug-in as they did with Blogger. Or better yet use the Sun partership to ship Open Office/Star Office suite with a Google Office connection. How bout have a way to synchronize Writely sessions via online, Word, and Open Office clients. It’s just text that needs to be transmitted, so there doesn’t need to be any conversion of any sort.

Basically, I edit something offline and then when I get back online, it looks to see if the file was edited during the offline session. If the document has been edited it will alert and show the changes then proceed to make the necessary chages. This constant synchronization would constantly remain in the background and people would not know when they start using Writely and when they stop.

Now include the Google Talk component and you can see that Writely’s userbase skyrockets from around few hundred thousand, maybe a million to the entire Googlesphere. As you edit the document, you can chat with the other person discussing the changes that should be made or even watch the other person edit the document in real time.

Writely Greasemonkey

July 27th, 2006

After a day of hardwork, here it is in all of its glory:

Writely Greasemonkey Script (0.1 Alpha)
(You need Greasemonkey to run this script.)

Basically, I “borrowed” this script from TypeTester @ typetester.maratz.com and this basically retrieves all the client’s fonts through a flash file.

The flash file has the following action script:
var user_fonts = TextField.getFontList();
user_fonts.sort();
getURL(”javascript:getFontList(\”" + escape(user_fonts) + “\”)”, “_self”);
(I used Sothink SWF Decompiler for that part)

Then the Greasemonkey adds this flash file as a 1×1 pixel at the bottom of the screen and then adds my custom javascript to the head part of the HTML. This is a very early version of whats coming up, this version only retrieves all the fonts.

I just got started with Greasemonkey and it’s amazing what can be done.

If you would like to host the flash and javascript here’s the zipped verison.

In Firefox, you can’t view Wingdings, Symbol, and Webdings to fix it: http://www.mvps.org/dmcritchie/firefox/firefox.htm.

I just tested this with Linux unfortunately, it doesn’t recognize the fonts so this won’t work. Sorry :(

Calacanis = Root of all evil?

July 19th, 2006

Can Calacanis’s offer really stir the “Web 2.0″ into the kind of “sky-is-falling-pretty-damn-fast-so-someone-fix-it-quickly!” hysteria? All he really did was offer individuals with superior skills some money. Now how does that really hurt anyone? This madness is a result of a melting pot of the following mentalities:

  1. Money = Root of all evil!
  2. Fanboys/Religious Zealots
  3. Original Idea

Money = Root of all evil!
These people believe that anything that starts out as a non-profit endeavor should remain so to avoid suffering the from the harsh realities of corruption and poor quality. These conclusions, however, are the result of years of training from politicians and scrupulous businessmen. People have come to believe that money is just the root of all bad things. Is it a coincidence that the “Do no evil” company does not charge for any of its products [except advertising]?

Yet, people don’t seem to realize that money only increases the quality of the good or the affordability for the mass market. It’s hard to believe that the Top 10 Diggers would destroy their reputation for a quick buck, it would only cause them to rethink digging the article in question.

as SidneyV (commentator on roughtype.com) pointed out:

Along the same lines, remember the “Homebrew Computer Club”? Personal computing was led by the same phenomenon of amateur peer production, but now we have Dell. Going back further, weren’t the Wright brothers amateurs too? Certainly they weren’t professionaly trained aeronautics engineers …

Fanboys/Religous Zealots
Another reason people are so hesitant about this idea of paying social bookmarkers, because they seem to be afraid it might knock of their sacred Digg or shake them up. Oh, what an agony! People are generally just afraid of some competition. Netscape trying to be Digg was such a joke.

Now that Netscape may have a plan to beat Digg becomes a very scary reality. Diggers are into this protection mode, where they try to denounce any threat to their domain. They seem to be trying to ride this wave of fury to ease the pain of possible outcomes. I think its hard for them to believe that Digg maybe dethroned as the King of the Sandcastle and Netscape may take the Hill. In all reality, Digg only caters to a handful of techies that need the latest fix (I’m included), but Netscape could potentially unleash this community goodness to the masses.

Ironically, however, Digg also pushes all the anti-religious links to the front, but then creates every tech related issue into a religious battle. At the very least religious people have a more profound question they are trying to answer.

Original Idea
Another factor, could just be that this is an original idea. Well maybe the idea is not original but since Jason is the first to execute the plan, there’s just the hostility any new idea faces. People believe its crazy and can’t be done, but this is just old mentality. A lot of innovative products have got this temperament and as time tells, these are short lived hypes that have no place in the modern world.

Just as you point out, almost every new field of activity starts out as a hobby and passion, and then matures into a profession.
As the common adage goes, just because he may steal your thunder doesn’t mean you have to rain on his parade.

Regex Dependent User Interface Design

May 22nd, 2006

Recently, I’ve been thinking about different UI designs MP3 players specifically the iPod. They all seem to do the same thing: just browse through the collection of songs one at a time. They seem to work well with a limited number of songs maybe up to a few hundred, but when that number increases to a few thousand I can see where problems may arise. The ability to go from Song A to Song B takes a great deal of time depending on where they are in the collection. Not to mention if the list has been shuffled.

Note: I will preface this piece stating that I have not personally used the interface for many MP3 players and for the ones I have it is very limited. Most of my observation comes from friends scrolling through their music collections, but they have not directly expressed any complaints. This is just a pesonal project to increase the efficiency of MP3 playback. Let me know in the comments section if I’m dreaming, if this is applicable or if I just reinvented the wheel.

My UI does not depend on a scroll wheel or a scrolling cursor, but it does include one for scrolling in a limited collection. I have come up with a UI that implements a OLED screen or some kind of visual touch-sensitive display similar to the Olympus M:Robe. However, the interface would change between the next, previous, play/pause, menu, and scroll buttons to an interface with the letters ETAOIN, a _ (space), and a . (period). Options could include:

  1. Begins with which would append the string with a “.*$” to look like: “^(user entered string).*$”
  2. Ends with which would prepend the string with a “^.*” to look like: “^.*(user entered string)$”
  3. Contains which would prepend and append the string with a “.*” to look like “^.*(user entered string).*$”

Then implement regular expressions to find the artist, song name, album name, etc.

For example, if one wanted to find songs from the artist Eminem they would enter “e.ine.” or a more complicated name such as Royce Da 5′9″ they would select the option Begins with “.o..e_” and using regular expressions the software would find all songs from that paticular artist.

All the strings would be parsed in the format “^(user entered string)$”. From my experiment (using all the rap artists on wikipedia copied/pasted into a text file in Notepad2) it faired pretty well. I have yet to test it out with song names. If someone could Photoshop a quick prototype for me that would be greatly appreciated (using the M:Robe style would be cool). If any clarification is needed please comment.

CAPTCHA

April 7th, 2006

Wow! I haven’t posted for a very long time, which I find unacceptable. I just can’t believe so much time passed. But without further ado.

Earlier I digged an article dealing with an interesting CAPTCHA mechanism using cute kittens and it’s pretty interesting. So I went back into my thought archive and pulled out a CAPTCHA mechanism I’ve been thinking about. Let me know what you think about them:

Have an image with different words everywhere and have the user identify a specific word For example, have a cluttered office desk with reports about various things with the words with different effects but still readable and then have a University Graduation plaque on the wall with a name tag.

A very crude image follows:

CAPTCHA

(in a haste the images are stolen from: orig.app.com and diplomaframe.com)

Well the “John Smith” can be altered using some scripts and fonts and the Diploma won’t look so bootleg. Also the cluttered paper could have some meaningful text so that when you try to figure out if the registrar is a human or not, questions such as “Who is the (wo)man?”, “What college did he graduate”, “What magazine is (s)he reading”, etc.

Another mechanism was have a program do Google Image searches for [in]famous people, paintings, buildings, etc. and then post a random image asking the potential human to identify the person. Also, it doesn’t matter who’s in the picture as long as they get the person, profession, etc. right. For example, do a Google search for Michael Jackson and the first image is him with two kids (ironically, but it is a very hideous picture). Now as far as my knowledge I don’t know of any programs with advanced facial recognition except for Riya. Also, with Michael’s many faces he could serve for many uses (which is the reason I chose him over anyone else).

Another image would be the Mona Lisa with its many representations on the WWW.

Interactive TV

November 3rd, 2005

Well, basically I would like start out by telling the audience what my blog discusses. I discuss different methods or innovations that are long overdue and ways to go about doing them. Today I am addressing the issue of public television and the annoying commercials.

Interactive Television will be a system where a user can point and click to objects on the screen and each object could have a link or some kind of advertisement linked to it. For example, if there was a basketball game on television clicking on the players’ clothing would show the clothing company, places to buy the clothing in nearby areas and websites with prices (if available obviously), as well as other information the user may want to like material of the clothing. Using the same example, the user can click on the player and figure out their stats and compare them to other players on the field. Additionally, the players could add or remove certain elements in the scene if necessary. Suppose the user filmed a soccer game and wanted it to broadcast it to subscribers but show trial members a clip to show quality, the content provider could delete the ball or an individual player. He/she could add advertisement paying for the clip instead of the advertisement sponsoring the game so instead of showing a billboard for Nike, the person could show related Yahoo Ads.

Another example to help clarify the concept is imagine watching Miss America 2006 (this would most probably apply to women but since I am not a woman I am not sure) with the ability to click on the contestant’s hair and it would display the hair designer/salon where the hair was styled, hair-styling products used, salons in nearby locations (that can do the look or just hair salons), and etc.

This can be accomplished using various technologies ranging from the debated and controversial MPEG-4 to Flash. In MPEG-4, elements are objects that can be manipulated easily; however, the licensing fees and royalties are very confusing, which has slowed down its acceptance. Additionally, MPEG-2 was quite popular and successful. In Flash, the objects could be layered and links could be added to them.

If the technology progresses enough, video clips should be able to be automatically converted so that objects/elements could be linked to places and things that directly targets the individual viewer based of his/her preferences and past history. This could encroach personal privacy (not really sure how, but people think anything that can forecast with some accuracy our likings is privacy violation).

Student/Researcher Version of Writely (or any other text editor)

October 30th, 2005

I was just thinking for the past few months while using Writely and other webapps, wouldn’t it be great, if these webapps made it easier for students and researchers to write up reports. Certain modules that would increase the productivity of these apps would be to include:

  • Research Module- based on keywords an engine searches blogs, news sites, social bookmarking sites (i.e. del.icio.us for links), wikipedia, search engines, look for books on Amazon, and other information portals. The technology would be like Google’s AdWords. Additionally, it could provide a definition and other information by high lighting a word and looking it up similar to the functionality provided by the Research Service in Word 2003. The Research Module could, this may be asking for too much, help the individual by providing tips depending on the type of paper he/she is working on (the person would manually select it).
  • An Image Scroller- would do the same as the Research Module but would look for pictures from places like flickr and other places where they provide royalty-free/hassle-free images (or depending if you have subscription).
  • MLA/APA/Other Standard Citation Module- Depending on the link or book you go to in the Research Module it would automatically add it to the Works Referenced page. Then if you copy and paste the information provided in the paper it will automatically append the correct in-text citation and add it to the Works Cited page. It could even search Amazon.com if one happens to look through a book but only jotted down partial information and wanted to properly cite it. I’m not saying someone could not just search it by themselves but it would become easier if there were a search bar on the side to do it while viewing their paper. Most of this already exists at Easybib
  • Plagiarism Detection-A big one for highschoolers/college students since teachers are becoming more and more strict about plagiarism. I am not exactly sure how this module would work but it could use one of these sites: My Drop Box, Turn It In, or My Essay Scanner.
  • Finally, I think this has already been done but in Writely I haven’t found this functionality, the ability to add custom XHTML/CSS or XML/XLS code for formatting.

Most of these things have been done but I have never seen the services been merged. I am working on putting together this version of Writely (I am not working for or with Writely, this project will be separate but I compare it to their product since it is the best known web-based Text Editor). Yet, the work has been delaying due to school and my ongoing research of different methods.