• Web Development - WAYWO - #8
    5,514 replies, posted
[QUOTE=KmartSqrl;39971275]God I fucking love rails [code] start_date = DateTime.parse(params[:start_date]).in_time_zone("Pacific Time (US & Canada)").beginning_of_day end_date = DateTime.parse(params[:end_date]).in_time_zone("Pacific Time (US & Canada)").end_of_day [/code][/QUOTE] That is pretty verbose if you ask me..
It says exactly what it's doing though, which is a lot better than if I was adding and subtracting time from those DateTime objects to adjust it the way I need to. I don't really think it's verbose, it's creating a datetime object from a string in the format of 'dd-mm-yyyy', converting it from utc to pacific time, and then adjusting the hours/minutes/seconds so that one is the start of the day, and one is the end of the day. I'm not sure how you would possibly make that more succinct. [editline]19th March 2013[/editline] That's all stuff that Rails supports out of the box too, so not custom functionality I've written [editline]19th March 2013[/editline] Also, apparently Sublime disagrees with the metaprogramming I'm trying to do because every time I write define_method it is crashing...
[QUOTE=KmartSqrl;39973986]It says exactly what it's doing though, which is a lot better than if I was adding and subtracting time from those DateTime objects to adjust it the way I need to.[/QUOTE] I know it's a matter of preference, but I find well written operator overloads very useful. I'd say it's a lot better to add two DateTime objects if it reacts exactly the way you expect it to (which might not the case 100% of the time in .NET when it comes to DateTime, but it's for reasons unrelated to the overload).
To get what I want I would have to do... [code] ((DateTime.parse(params[:end_date]) + 1.day) - 1.second) - 8.hours [/code] Which looks sloppier and also doesn't take DST in to account at all
[QUOTE=KmartSqrl;39973986] Also, apparently Sublime disagrees with the metaprogramming I'm trying to do because every time I write define_method it is crashing...[/QUOTE] Hmm, have you tried Sublime Text 3 Beta? (Assuming you bought Sublime)
[QUOTE=Killervalon;39977682]Hmm, have you tried Sublime Text 3 Beta? (Assuming you bought Sublime)[/QUOTE] Keep in mind that package manager does not work with ST3 D:
[QUOTE=Amiga OS;39979115][t]http://i.imgur.com/TFlSdMr.png[/t][/QUOTE] That is really nice, I like the purple. Why do schools offer I.T when their knowledge is still based in 2005, or even older? I need to make a website in some shitty builder using absolute div tags, the banner must be an iframe and they are using absolute paths on your local computer - to solve the content not displaying on the teacher's side you need to take screenshots of your website. Does anyone else think it's ridiculous how schools really degrade someone's knowledge and point them in the wrong direction? surely it's nothing new, but it's 2013...
[QUOTE=Killervalon;39977682]Hmm, have you tried Sublime Text 3 Beta? (Assuming you bought Sublime)[/QUOTE] I've got too many packages that I use regularly to update to 3 yet. I found out that the issue was with sublimelinter trying to run the file through ruby -wc which was crashing sublime with the incomplete define_method calls for some reason.
Remade by homepage for the nth time: [IMG]http://i.imgur.com/xsFwQoi.png[/IMG] Feel free to [URL="http://saming.free.fr/"]check it out in motion.[/URL] Also, feedback if you'd like. I tested it in Chrome, Firefox, Opera and IE9 this time.
[QUOTE=saming;39981246]Remade by homepage for the nth time: [IMG]http://i.imgur.com/xsFwQoi.png[/IMG] Feel free to [URL="http://saming.free.fr/"]check it out in motion.[/URL] Also, feedback if you'd like. I tested it in Chrome, Firefox, Opera and IE9 this time.[/QUOTE] Why does it remind me of the [URL="http://www.abingdon-witney.ac.uk/"]college website[/URL] that I go to? It's pretty, it looks awesome.
Just stumbled upon this... Impressed. [url]http://journey.lifeofpimovie.com/#!/[/url]
Out with the old: [t]http://i.imgur.com/1KxqkvF.png[/t] In with the new: [t]http://i.imgur.com/ncpNhKp.png[/t] Now with WordPress integration, responsiveness, and 142% less ugly. [url]http://hgreen.co.uk/[/url]
[vid]http://dl.dropbox.com/u/23271099/nitefall2.webm[/vid] Doing some CSS3 stuff
[QUOTE=kragmars102;39979148]That is really nice, I like the purple. Why do schools offer I.T when their knowledge is still based in 2005, or even older? I need to make a website in some shitty builder using absolute div tags, the banner must be an iframe and they are using absolute paths on your local computer - to solve the content not displaying on the teacher's side you need to take screenshots of your website. Does anyone else think it's ridiculous how schools really degrade someone's knowledge and point them in the wrong direction? surely it's nothing new, but it's 2013...[/QUOTE] Because as long as they offer it they can advertise it and get funding for it. Schools are the death of IT.
[QUOTE=kragmars102;39979148]That is really nice, I like the purple. Why do schools offer I.T when their knowledge is still based in 2005, or even older? I need to make a website in some shitty builder using absolute div tags, the banner must be an iframe and they are using absolute paths on your local computer - to solve the content not displaying on the teacher's side you need to take screenshots of your website. Does anyone else think it's ridiculous how schools really degrade someone's knowledge and point them in the wrong direction? surely it's nothing new, but it's 2013...[/QUOTE] It gets better in college, we have a nice server here where they let us host anything we want and I got my site on the server up to #1 on google. Too bad I did it after my web classes ended. :V Also whenever I post in this section I always try to save what I type for some reason, CMD-S CMD-S, probably an effect of seeing code and typing.
[QUOTE=saming;39981246]Remade by homepage for the nth time: [IMG]http://i.imgur.com/xsFwQoi.png[/IMG] Feel free to [URL="http://saming.free.fr/"]check it out in motion.[/URL] Also, feedback if you'd like. I tested it in Chrome, Firefox, Opera and IE9 this time.[/QUOTE] I always love your designs, saming.
The Amuzor VPS expired today so I've decided to open-source the Amuzor codebase. It's extremely dodgy since we just kept building on the same shoddy codebase we had when we started. We've learnt a hell of a lot since then so please take that into consideration. This is purely for anyone who's curious as to how it all worked. [URL]https://github.com/sebmck/amuzor[/URL]
[QUOTE=nehkz;39985998]I always love your designs, saming.[/QUOTE] Thank you very much :smile:
[QUOTE=Jelly;39988544]The Amuzor VPS expired today so I've decided to open-source the Amuzor codebase. It's extremely dodgy since we just kept building on the same shoddy codebase we had when we started. We've learnt a hell of a lot since then so please take that into consideration. This is purely for anyone who's curious as to how it all worked. [URL]https://github.com/sebmck/amuzor[/URL][/QUOTE] Coffeescript and Moonscript are two great examples of worthless parasitic scripting languages.
I'm using coffeescript on daily750.com and I dig it. Feels a lot cleaner than javascript({{{((((}{{}}{{}))));
[QUOTE=KmartSqrl;39991764]I'm using coffeescript on daily750.com and I dig it. Feels a lot cleaner than javascript({{{((((}{{}}{{}))));[/QUOTE] I used to be a hardcore Cofeescript fanboy but after a while I got sick of the ambiguity (something I already hated about Ruby) and switch to standard Javascript. My life has been much better since.
After Ruby, everything in coffeescript felt a mess; in classes I had to use @methodName() which felt completely dirty.
[QUOTE=Jelly;39993144]I used to be a hardcore Cofeescript fanboy but after a while I got sick of the ambiguity (something I already hated about Ruby) and switch to standard Javascript. My life has been much better since.[/QUOTE] I think with both of those languages ambiguity comes more from coding style than the syntax of the language.
Have you guys ever used Django + cheetah? I'm thinking of writing my next website using cheetah.
Does anyone know a lightweight blogging software? Since I don't know any back-end languages I can't write my own.
If you're looking for a quick and easy solution just use wordpress
chyrp.net Is what you are looking for that shits awesome.
[QUOTE=KmartSqrl;40001000]If you're looking for a quick and easy solution just use wordpress[/QUOTE] Never. It's more CMS than Blogging software now. [QUOTE=Superbird;40001003]chyrp.net Is what you are looking for that shits awesome.[/QUOTE] Ah, thanks!
[QUOTE=nehkz;40001109]Never. It's more CMS than Blogging software now.[/QUOTE] What? It's absolutely primarily a blogging platform still. The CMS centric stuff wordpress has is incredibly sub-par when compared to real CMSes.
[QUOTE=nehkz;40000953]Does anyone know a lightweight blogging software? Since I don't know any back-end languages I can't write my own.[/QUOTE] [URL="http://anchorcms.com/"][IMG]http://anchorcms.com/assets/img/logo.png[/IMG][/URL] is pretty great. Made by Visual Idiot.
Sorry, you need to Log In to post a reply to this thread.