• What are you working on? v7
    7,420 replies, posted
  • Avatar of adamjon858
  • I subscribed to the W3C and WhatWG newsgroups recently. It's really interesting seeing all the things they're talking about putting in HTML5 etc
  • [IMG]http://i46.tinypic.com/e9b68o.png[/IMG] [IMG]http://i48.tinypic.com/2iibxhe.png[/IMG] Text needs a bit of work (its a placeholder) :)
  • Avatar of spidersdesign
  • If there are any python devs that could shed some light on to this I would be appreciative: Background: Thread safe python app using GAE webapp Page class represents a page and has properties like title, slug etc. Pages class is a controller that is used to fetch the correct Page class to handle the request The Pages class maintains the following indexes to make retrieving Page objects fast: filename: primary index by the name of the file defining the page path: index by the path that the page serves The indexes are just dictionaries (arrays if you are a php dev) with the value being the Page object Issue: Lets say we have a page called 'home' Upon first request to this page a Page object is initialized, lets call it Page1. A function determines what path home serves and adds it to the path index. The filename and path indexes now looks like this respectively: [code] { "home.volcano": <Page object: Page1> } [/code] [code] { "/path/": <Page object: Page1> } [/code] As you can see they are pointers to the same physical object in memory so if a piece of code retrieves the page from one index, modifies an attribute and then retrieves it from another the modified attribute will be available as it is the same object. This is how it is meant to work but on the second request this happens: [code] { "home.volcano": <Page object: Page1> } [/code] [code] { "/path/": <Page object: Page2> } [/code] then the third request: [code] { "home.volcano": <Page object: Page1> } [/code] [code] { "/path/": <Page object: Page3> } [/code] As you can see for some reason a copy is being made of the Page object which breaks things. I have got around it by making all the secondary indexes contain a string which is the filename which is then used to retrieve the Page object from the primary index but I would really like to know what causes this to happen.
  • Avatar of hzy
  • [QUOTE=spidersdesign;36170360]If there are any python devs that could shed some light on to this I would be appreciative: Background: Thread safe python app using GAE webapp Page class represents a page and has properties like title, slug etc. Pages class is a controller that is used to fetch the correct Page class to handle the request The Pages class maintains the following indexes to make retrieving Page objects fast: filename: primary index by the name of the file defining the page path: index by the path that the page serves The indexes are just dictionaries (arrays if you are a php dev) with the value being the Page object Issue: Lets say we have a page called 'home' Upon first request to this page a Page object is initialized, lets call it Page1. A function determines what path home serves and adds it to the path index. The filename and path indexes now looks like this respectively: [code] { "home.volcano": <Page object: Page1> } [/code] [code] { "/path/": <Page object: Page1> } [/code] As you can see they are pointers to the same physical object in memory so if a piece of code retrieves the page from one index, modifies an attribute and then retrieves it from another the modified attribute will be available as it is the same object. This is how it is meant to work but on the second request this happens: [code] { "home.volcano": <Page object: Page1> } [/code] [code] { "/path/": <Page object: Page2> } [/code] then the third request: [code] { "home.volcano": <Page object: Page1> } [/code] [code] { "/path/": <Page object: Page3> } [/code] As you can see for some reason a copy is being made of the Page object which breaks things. I have got around it by making all the secondary indexes contain a string which is the filename which is then used to retrieve the Page object from the primary index but I would really like to know what causes this to happen.[/QUOTE] to get a real answer you're going to need to paste code. wild guess: you're pickling/marshalling the object accidentally? also that seems like a really crappy way to handle pages.
  • Avatar of spidersdesign
  • [QUOTE=H4Z3Y;36170595]to get a real answer you're going to need to paste code. wild guess: you're pickling/marshalling the object accidentally? also that seems like a really crappy way to handle pages.[/QUOTE] I would paste the code except it is across several files and the github repo is private - if you give me an email address I'll add you to the github repo. That would be a really crappy way to handle pages for lots of setups but not for mine: The site is static in the sense that it never has to respond to any user input. The content is stored in '.volcano' files in a directory called content. By default the path that the file handles is the file name but this can be overridden by setting the 'slug' attribute. The volcano files are YAML files which make them super readable and easy to edit: [code] title: private blog slug: private-blog template: private-blog description: > Want to make your blog private from prying eyes? Well my password protection plugin is perfect for that job; with its sexy looks (well sort of), intelligent UI and endless features it will make the chore of keeping your data secure and private easy. support-url: http://google.com redirect-urls: - password-protect-wordpress-plugin [/code] The content is rendered using jinja2 templates: [url]http://jinja.pocoo.org/docs/templates/[/url] All the variables from the volcano file and some extra ones are passed to the template renderer. Upon deployment all the pages are compiled and cached to the db and memcache so the overheads of parsing the volcano files, and rendering the template do not affect any actual response (even though they are not significant as the site does not have loads of pages). Also the js and css are minified and concatenated and will be run through the google closure compiler when I implement that. I designed the system to conform to an MVC style architecture and be really easy to maintain. Using this system I can crack out a basic site in no time at all. I should also point out that the volcano files support things like this: [code] title: Lovely Title path: '{{ title | urlsafe }}' [/code] so the path would be 'lovely-title'
  • Avatar of hzy
  • working on this: [img]http://f.cl.ly/items/3i0G1t041z1y3g1x2B1F/Screen%20Shot%202012-06-03%20at%204.40.44%20AM.png[/img] god DAMN fluid layouts are annoying.
  • Avatar of adamjon858
  • Yeah, I prefer just using a separate site for mobile/iPad. Responsive design is too much of a bitch most of the time.
  • Avatar of swift and shift
  • [QUOTE=adamjon858;36176737]Yeah, I prefer just using a separate site for mobile/iPad. Responsive design is too much of a bitch most of the time.[/QUOTE] as long as the mobile site is just as functional as the main site - it shouldn't be a second rate experience
  • Avatar of itsbth
  • [code]module 'name', ($, _, MarkDown) -> $('#btn').click -> # ...[/code] Not entirely sure if this is a neat trick or a horrible abomination...
  • Avatar of swift and shift
  • [QUOTE=itsbth;36179284][code]module 'name', ($, _, MarkDown) -> $('#btn').click -> # ...[/code] Not entirely sure if this is a neat trick or a horrible abomination...[/QUOTE] what's the trick
  • Avatar of itsbth
  • [QUOTE=swift and shift;36179545]what's the trick[/QUOTE] Specifying dependencies in the argument names.
  • Avatar of itsbth
  • [QUOTE=swift and shift;36179713]I like it[/QUOTE] Decided to [i]finish[/i] it, and was naive enough to think that a rewrite would result in cleaner code (in my defense, I've been up all night and barely got any sleep last night). Here's a [url=https://github.com/itsbth/ILoader]demo[/url], and the [url=https://github.com/itsbth/ILoader/]code[/url].
  • Avatar of thingshappen
  • Wanted to create a simplistic web page that's different from the linear layouts of most websites. Uses Ajax to load each page during the fade, and if it can't load it in time it shows a loading screen, but you don't see that considering it's hosted locally. [vid]http://dl.dropbox.com/u/3851117/Website.webm[/vid] It also resizes depending on the screen resolution, so it'll always look the same regardless of the screen. The black bar at the bottom is as a result of recording Chrome, don't mind it.
  • [QUOTE=Jelly;36189379]Why not have it start the loading in the background on hover?[/QUOTE] I don't think that would end well.
  • Avatar of Jelly
  • [QUOTE=AndrewPH;36189460]I don't think that would end well.[/QUOTE] How couldn't it? When you go to a website do you hover over every link? I take it that the pages that it fetches are pretty small so it's not as if the server is going to be under heavy load.
  • [QUOTE=Jelly;36189556]How couldn't it? When you go to a website do you hover over every link? I take it that the pages that it fetches are pretty small so it's not as if the server is going to be under heavy load.[/QUOTE] It'll make a lot of unneeded requests if somebody just sits there, twiddling their thumbs, hovering over every page link a million times. It would also mean requesting and downloading pages that the end user doesn't [i]need[/i] to download.
  • Avatar of swift and shift
  • [QUOTE=AndrewPH;36191213]It'll make a lot of unneeded requests if somebody just sits there, twiddling their thumbs, hovering over every page link a million times. It would also mean requesting and downloading pages that the end user doesn't [i]need[/i] to download.[/QUOTE] oh no not an extra couple of kb [editline]4th June 2012[/editline] also rating someone dumb just because you disagree is poor etiquette
  • Avatar of Jelly
  • [QUOTE=AndrewPH;36191213]It'll make a lot of unneeded requests if somebody just sits there, twiddling their thumbs, hovering over every page link a million times. It would also mean requesting and downloading pages that the end user doesn't [i]need[/i] to download.[/QUOTE] Are you nuts? You would only load it once on hover not every single time. You're aware that this is a strategy used by companies like Google who have even more stringent bandwidth, right? It's not as if it's a new or revolutionary idea.
  • Avatar of C:\
  • If you're going to argue, take it to PM's, otherwise, give CC / post content.
  • [QUOTE=thingshappen;36189180]Wanted to create a simplistic web page that's different from the linear layouts of most websites. Uses Ajax to load each page during the fade, and if it can't load it in time it shows a loading screen, but you don't see that considering it's hosted locally. -vid- It also resizes depending on the screen resolution, so it'll always look the same regardless of the screen. The black bar at the bottom is as a result of recording Chrome, don't mind it.[/QUOTE] Reminds me of something made in the age of Windows XP, where the element of spacial dissonance combined with bright color ranges was something fashionable. Nowadays, this approach to layouts isn't seen as something frequently used or very trendy. Just a heads up.
  • [QUOTE=Jelly;36191497]Are you nuts? You would only load it once on hover not every single time. You're aware that this is a strategy used by companies like Google who have even more stringent bandwidth, right? It's not as if it's a new or revolutionary idea.[/QUOTE] You made it out to sound like you meant on every single hover, regardless of if they've loaded it or not already, not just once per hover. Not a bad idea if you only load it once :v: [QUOTE=thingshappen;36189180]Wanted to create a simplistic web page that's different from the linear layouts of most websites. Uses Ajax to load each page during the fade, and if it can't load it in time it shows a loading screen, but you don't see that considering it's hosted locally. -snipdatvid- It also resizes depending on the screen resolution, so it'll always look the same regardless of the screen. The black bar at the bottom is as a result of recording Chrome, don't mind it.[/QUOTE] Really neat. Although this isn't really an issue, there's no quick way to tell that you aren't on the home page (besides the 'back' text), perhaps small text above the central message saying where you are in relating to the base page? Can't think of a really good-looking way of doing that.
  • Avatar of spidersdesign
  • I wasn't expecting to like windows 8 in the slightest but even after just a few days trying it out I am turned. Metro isn't my thing, simply because the only metro app I can see myself using is the messages app but there are so many non-metro improvements to the OS that easily outweigh the learning curve of using the start screen (because that is all it is - a learning curve, there is no regression in features and once you get used to it it feels just as natural as the start menu): [url]http://snippi.com/s/kb93b01[/url]
  • Avatar of adamjon858
  • thingshappen: I hate that shit. From the copy to the layout...sorry. "We make websites. Thats about it" Well that makes me feel great as a customer. You guys don't go above and beyond to provide me with a great experience? [B]Showed this to my focus group. Here's what they said:[/B] "It looks looks like a fucking flash website" - Ghandi "Shit's harder than string theory to understand " - Albert Einstein "FUCK FUCK FUCK FUCK FUCK FUCK FUCK FUCK" - King George VI
  • Avatar of garry
  • I used AngularJS to make this [url]http://api.facepunch.com/[/url] . I really love how AngularJS works. I get the feeling I haven't scratched the surface of understanding though, so am going to try to learn more this week. Also waiting to see if google actually indexes the pages it creates.