After using Elinks on POJ. I'm very amazed with how POJ turned out. It looks super elegant!
See the image here
I think simplicity is the key to design.
I'm no designer, but I would be perfectly happy if every website can be accessed in elinks style I showed.
So what should the style look like?
Everything have the same fixed size font. It's possible to have bold fonts for strong characters or something. At most 16 colors can be used. Too many colors doesn't help bring up the contents.
Minimum CSS for layout. In fact, there should only be layout for simple positions. It should have 1 column layout because it's awesome.
What about sidebars? you might ask.
Sidebar is overrated. When is the last time I looked at the sidebar? If one need to see list of recent comments, recent blog post and stuff, they should go to a special page that show stuff like this. Most sidebar items are not useful content at all.
Adapting the unix philosophy on content presentation.
"Write a site that show one thing and show it well"
I can't just go refresh some pages every few seconds. I wish there is something to notify me when something happens. It also keeps a log of the notifications.
Something that is so simple I can open a terminal window and do stuff like "Show notifications", and it opens up some automatic updating list of notifications. Almost like a chat log. Oh right, that's exactly what I need.
Anything like that exists?
libnotify, omg heavy weight.
I mean it should be so simple, it doesn't depend on anything.
It sounds just like it can be done with 1 file + a script(python, bash, w/e)
Go minimalism.
I usually need two kind of notifications. One is a notification of (aggregated) existence, the other is notification that contain enough information such I don't have to check what exactly it is.
I only need the first kind, because I don't want to refresh stuff all the time.
Here is a script that clear the screen and only show the content of one file. It automatically update it when ever the file changes, and rings the terminal bell.
Which means it act as a awesome notification system. The file should hold notifications. Stuff like
"5 new mails"
"Facebook has updates"
So I write a simple script in python to update this thing. Now I can run something like python send_notification.py gmail "You have 3 mail" to notify. Which means any script can run this in the shell and do it.
import os import time import sys import math import string import StringIO f = open('notify.txt', 'r') lines = f.readlines() f.close() w = StringIO.StringIO() for line in lines: a = string.split(line)[1] if (a != sys.argv[1]) : w.write(line) tmp = str(int(math.floor(time.time())))+ " " + sys.argv[1] + " " + sys.argv[2]+"\n" w.write(tmp) f = open('notify.txt', 'w') f.write(w.getvalue()) f.close() w.close()
Awesome.
I have made the framework. Now just need someone to write scripts to invoke this thing. Hmm, I assume this thing can be made better. gimme your feedbacks.
I like to record the problems so I can use them in the future.
I like data to be portable. I should create some standard so I and possibility someone else can use to store problems for really easy manipulation later.(Minimal migration required).
Currently I haven't developed the system I need to manipulate those data. There will be some function map each JSON file to a directory of files.(each resource is a file) Someone going to write it, likely me.
Problems can be recorded with JSON or XML. I prefer JSON.
top level there are the field id, name, output and resources
where id is a unique string(here I use a 64bit integer in hex form).(btw I have this 64bit integer in hex script that generate it for you)
name is the name for the problem. In English or Romanization/translation of the name of the problem.
Output is an array of objects, each have 4 fields: type, format, language, and out. Type can be "problem_statement, sample_in, sample_out, input, output" and others I can't think of.
format include any possible plain text output format that might be useful. I think "latex, html" are pretty much it for now. out is either a string or an array of strings.
Language is the language it is in. Seems reasonable.
Resource field is there to store binary files. It's an dictionary of binary files. Currently I don't need it. It is possible to use it for the future.
BTW JSON is a context free language.
{ "id": "7455689cc5d35040", "name": "Putnam and Beyond Problem 12", "output": [ { "type": "problem_statement", "format": "latex", "language": "English", "out": [ "Prove that $|\\sin nx| \\leq n |\\sin x|$ for any real number $x$ and positive integer $n$." ] }, { "type": "citation", "format": "plain", "language": "English", "out": [ "Putnam and Beyond ISBN:9780387257655 p.6" ] } ] }
Nice.
Of course, it can be XML files.
This will become useful later.
I'm keeping set of problems in some database. So I can keep a queue of problems I didn't figure out the first time by just record their ID's somewhere.
I found it boring to only solving problems by myself.
Only a few classes I have attended have interactive problem solving sessions, those classes ROCKED.
---List of problem solving sessions I had on campus--- ignore if you don't care---
CSE 150, I think this is the best course I have taken in my entire life. I assume this class is somewhat like classes in AwesomeMath or other math camps. Students engaged and anticipated in solving the problems.
CSE 350, especially the recitation, is similar to CSE 150.
There are two other classes related to problem solving, but not that interactive.
CSE 392. Most of the thinking for the problems are done outside classroom. The class is basically explaining how someone solved it.
MAT 160. I been to the class only twice. It seems to be like: Do the hw, discuss how it is done. Instead of doing it in class. What's good about the class, is there are people who are enthusiastic about solving the problems.
I expect to try MAT 260 and see how it works.
Other than courses, there are 2 other places I had done some problem solving.
Math club. Last semester the preparation for Putnam, the clubbers have done some problems.
ACM practice was also similar.
--------------------end list---------------------
I feel it's not enough. There is a lack of interactive problem solving sessions on campus. Won't it be nice if there is some club that meet sometimes every week and work on some problem collaboratively. Problems of math, computer science and physics nature. i.e. Union of math/cs/physics club and intersect it with problem solving.
Some possible format.
ARML/HMMT team competition like.
People can organize them into smaller groups, working on a set of problems at a time.
Then people explain their ideas.
Seminar like. Someone pick out some set of problem, and direct the flow of the solvers, ask for participation, until the problem get solved.(Similar to last semester's math club)
Just putting the idea out there. I would totally come to events like this.
Instead of using cvs, svn, git just for large open source projects. It can be used as a personal system for backups of text files.(that include source codes to essays)
Github gave each free user 300MB of space. Pretty nice. That should be enough for just storing texts, right?
It might be abusing the ToS a little. Github free should be used for free and open source projects. All the files one commit are open to everyone. Make sure only to back up things you allow others to see.
Let's assume one doesn't store the end product the first time they commit their work. And each commit should only create a small change in the work. To be safe, let all the revisions of a file 2 times the size of the original file. Then we have 100MB of space.
For some people, they use only ascii, thus 1 byte per characters. That would be 100 million characters.
I envy people who only know English, because they will never need to use any other language, thus live in ascii world happily. They never have to worry about charset, input method and some software might not support what ever they are going to type.
I digress.
Suppose someone use UTF in some of them. Then it need 50 million characters. Let's not consider them, just consider English and source codes.
Is it possible to write 100 million characters in one's life time?
Sure.
If one type at the speed of one character per second on average over a period of 3 years, it will surpass the limit.
Likely, that's not going to happen, especially if one use their brains before writing down anything. I use lots and lots of scrap papers. My notebooks are scrap papers. I only store information on the computer in electronic format.
The source of all the hw I have done from last semester to now is 0.2MB. All the source I submitted to any online judge this semester is 0.025MB. Certainly I have written other stuff, like my blog posts. Those doesn't require back up because it's in my blog. Suppose those do require backup, I would believe it is less than 0.25MB.
Thus a total of around 0.5MB of original data was generated for a period of around 6 months.
That means I can use github for backup for 100 years if my productivity stays the same.
The amount of keystrokes I had was "6163302", last updated 2010/01/23.(I don't have a linux version yet :() It was on the computer that I use less often after college, but I would believe it contained at least 6 months of keystrokes. Even if all those keystrokes are realized, it is only a 6MB file.
Github is at least good enough for 10 years. At least I can use it until I start to earn money to pay for extra storage. COOL.
If I got a new laptop, or I need to do something on someone else's computer. All I have to
do to sync is a few command line code. Nice.
Some people did all their work in Word or w/e, where do they back them up? Google Docs. LaTeX gave me more freedom because LaTeX codes are plain texts. WIN. That's why I stopped using word. Except I dislike how kile don't have automatic spell check function yet.
Recent comments
3 hours 33 min ago
3 days 45 min ago
3 days 9 hours ago
1 week 21 hours ago
1 week 2 days ago
1 week 2 days ago
1 week 4 days ago
2 weeks 1 day ago
2 weeks 1 day ago
2 weeks 4 days ago