Recent posts by Jesse Andrews
|
17 hours ago
|
Topic: Userscripts.org discussion / Monkey Barrel script - installation disabled Also check out GreaseFire. I'm almost done integrating the backend Steve built into USO. |
|
17 hours ago
|
Topic: Userscripts.org discussion / Threaded discussions on scripts @Mindeye - ya, unfortunately they are separate right now. I've been exhausted getting a new release of Taboo out.. Now that it is out I can hack on this tomorrow. |
|
Nov 28, 2008
|
Topic: Userscripts.org discussion / Minor grammar annoyances ScroogeMcPump - there are actually two number for "discussions" - the number of topics and the number of posts. I figured showing the number of posts was better for now. |
|
Nov 28, 2008
|
Topic: Userscripts.org discussion / Unread Topic Bug I was looking at what phpBB did - and it seems to not create any database indexes! That's crazy. The basic idea is pretty simple - perhaps I'll implement it and do a few EXPLAINs to see if the indexes (on both topic_id, user_id) is the right idea or if it is naive since I've never implemented this. |
|
Nov 27, 2008
|
Topic: Userscripts.org discussion / Unread Topic Bug this code is horrible - it just gets worse: the session[:forums] and session[:topics] share the same values (eg, it is 1 hash instead of 2 distinct hashes). That is why @ScroogeMcPump was getting that Topics 1,2,3 were set when he visited a forum! This code HAS to be rewritten - and stored the view time in the database... |
|
Nov 27, 2008
|
Topic: Userscripts.org discussion / Multiple Logins @dob - it is probably because of a stupid assumption by me. Sorry! I need to clean up uservoice so I can say "vote for it there"... |
|
Nov 27, 2008
|
Topic: Userscripts.org discussion / Minor grammar annoyances @RunningBlind, Fixed the "throughout" issue. @jerone, ya - the script "discussions" are powered by the some code that runs the forums. I'm not sure what the language should be. Opinions? |
|
Nov 26, 2008
|
Topic: Userscripts.org discussion / "The change you wanted was rejected" Rails 2.1 has a bug where every once in a while it starts throwing LoadErrors. I've spent hours trying to figure out what causes this. :( |
|
Nov 26, 2008
|
Topic: Userscripts.org discussion / Minor grammar annoyances jerone & runningblind, fixed |
|
Nov 26, 2008
|
Topic: Userscripts.org discussion / Monitored Posts Feed doesn't exist yet - I need to build the functionality. |
|
Nov 26, 2008
|
Topic: Userscripts.org discussion / Unread Topic Bug session[:last_active] ||= Time.now.utc should mean that last_active is only changed when it isn't already set. I don't see anything else that modifies it. I think that it only gets set the first time you visit. Long day - will dive into this more tomorrow. |
|
Nov 25, 2008
|
Topic: Userscripts.org discussion / Unread Topic Bug one obvious bug now that I've gotten some sleep is that when you post a reply on a topic it should set your last seen time for the topic to the time of your reply |
|
Nov 25, 2008
|
Topic: Userscripts.org discussion / Escape html I look. I just don't have a solution yet. The answer is rewriting the parser. Which is a long project. |
|
Nov 25, 2008
|
Topic: Userscripts.org discussion / @jesse ==> XHTML 1.0 Transitional Mistakes Ya, I appreciate it! |
|
Nov 25, 2008
|
Topic: Userscripts.org discussion / Unread Topic Bug To help figure this out, if you append a query param of debug=1 to the end of any URL it will output some of the session information: last_active and topics |
|
Nov 25, 2008
|
Topic: Userscripts.org discussion / Unread Topic Bug If you aren't used to ruby ||= is only define this if it isn't already. c = 3 c ||= 1 Would leave c equal to 3, but if c was nil/null/false/... then it would become 1. |
|
Nov 25, 2008
|
Topic: Userscripts.org discussion / Unread Topic Bug I'm sure there are bugs here since I've never touched this code: Whenever you view a topic, it modifies your session by storing the last time the topic.id was viewed.
(session[:topics] ||= {})[@topic.id] = Time.now.utc if logged_in?
The session is stored in a cookie (signed so it cannot be tamper with), so there could be issues with tabs (although I think rails is designed so it won't be) Then when a list of topics is rendered if the following is true then the topic has "new activity" and is marked in green. topic.replied_at > (session[:topics][topic.id] || last_active) Whenever a topic is updated the replied_at is updated. last_active is defined as: session[:last_active] ||= Time.now.utc I hadn't read the code before and nothing seems to stick out... Then again I'm exhausted :( |
|
Nov 25, 2008
|
Topic: Userscripts.org discussion / New menu The color difference is intentional. I like it myself, but if others dislike as well it can be changed. What I do want to improve is making the entire colored area clickable instead of just the anchor tag with no padding. |
|
Nov 25, 2008
|
Topic: Userscripts.org discussion / update to the scripts page and fonts Nice work @ScroogeMcPump! Deploying the fix! |
|
Nov 24, 2008
|
Topic: Userscripts.org discussion / New menu Part of the revised upload/update flow will include a place for a changelog... If only I didn't have a full time job! |
|
Nov 23, 2008
|
Topic: Userscripts.org discussion / @jesse ==> XHTML 1.0 Transitional Mistakes I agree that moo is nice. I prefer jQuery because it is what I know and am productive in. The ajax on this site is purposely minimal (if you were around when Britt and I first launched the site as greasemonkeyed.com, you might remember TONS of pointless ajax). |
|
Nov 23, 2008
|
Topic: Userscripts.org discussion / Minor grammar annoyances Updated. Keep posting if you find other stupid mistakes :) |
|
Nov 23, 2008
|
Topic: Userscripts.org discussion / New menu Guides aren't finished yet - they are a preview feature. Articles are in the header (as blog). Versions to the script menu is a good question, I've received lots of feedback that people don't want the feature at all. By only listing it if you are viewing the source code I felt it was a good compromise. |
|
Nov 23, 2008
|
Topic: Userscripts.org discussion / @jesse ==> XHTML 1.0 Transitional Mistakes I think I fixed all of these save the "spinner" issue, since Rails is generating that (incorrectly). Once I move from prototype.js to jQuery, I'll redo the ajax integration code. |
|
Nov 23, 2008
|
Topic: Userscripts.org discussion / Minor grammar annoyances @RunningBlind, While I can program in many languages, my skill at grammar is lacking. I appreciate "diffs" for improvement! I'm to blame for all but the "banana bar" - that was britt :) I had changed the headings so it included the username, but it seemed like too much repetition. (I assume you are talking about the user page). Let me know if you think this works. |
