1. Post #1681
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    Ruby also escapes anything you output.
    that's erubis, not ruby.

    Edited:

    Code:
    <%= @count unless @count == 0 %>
    I prefer writing @count.zero? rather than @count == 0. There's no difference, I just think #zero? looks nice
    Reply With Quote Edit / Delete Mac Australia Show Events

  2. Post #1682
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    It's definitely more readable which is nice when skimming through code.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Agree Agree x 1 (list)

  3. Post #1683
    Gold Member
    spidersdesign's Avatar
    September 2010
    440 Posts
    Okay, well. I think automerge is done having a fit.
    Anyways, picture time.



    The API name/site name is censored as I'm still testing some security bugs.
    Not sure how bad they are. I'll find out.
    Flask + SQLite3





    Here's some Jinja2/Flask templating magic:

    Code:
    {% for entry in entries %}
    <h2>{{ entry.title }}</h2>
    <p>{{ entry.body }}</p>
    {% else %}
    <p>Can you believe it? No entries here!</p>
    {% endfor %}
    I prefer writing that to any PHP/Ruby.

    Oh, also it has sandboxed execution and escapes HTML in dynamic scripting to prevent XSS attacks. Hooray.

    I love jinja2 as well and use it a lot with the GAE. There is also a php interpreter for it (not nearly as feature rich though) called h2o. It means I can easily keep a consistent UI between my plugin stuff (which has to be in php) and my server stuff (which can be in anything but I choose python) as I only need to write one set of template files for both.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  4. Post #1684
    It's definitely more readable which is nice when skimming through code.
    Which is incredibly important since you spend as much, if not more, time reading code as you do actually writing it when you're working on bigger projects, especially if you're not the only developer.

    Edited:

    Here's some Jinja2/Flask templating magic:

    Code:
    {% for entry in entries %}
    <h2>{{ entry.title }}</h2>
    <p>{{ entry.body }}</p>
    {% else %}
    <p>Can you believe it? No entries here!</p>
    {% endfor %}
    I prefer writing that to any PHP/Ruby.

    Oh, also it has sandboxed execution and escapes HTML in dynamic scripting to prevent XSS attacks. Hooray.
    http://liquidmarkup.org/
    Reply With Quote Edit / Delete Mac United States Show Events

  5. Post #1685
    Pass along
    commander204's Avatar
    May 2008
    4,065 Posts
    that's erubis, not ruby.

    Edited:



    I prefer writing @count.zero? rather than @count == 0. There's no difference, I just think #zero? looks nice
    Oh, I didn't know about that one! Using that now.

    I also didn't know about erubis yet.
    Reply With Quote Edit / Delete Windows 7 France Show Events

  6. Post #1686
    Dotmister's Avatar
    May 2008
    898 Posts
    Sorry if this has been covered before, but:

    What are the most widely used / new & upcoming methods of server side web development which aren't PHP yet still have a C-like syntax?
    (node.js I suppose, are there any others?)

    I'll be developing on windows and hosting on linux, so support for both platforms is required.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Funny Funny x 2 (list)

  7. Post #1687
    Why do you care if it has C like syntax?
    Reply With Quote Edit / Delete Mac United States Show Events

  8. Post #1688
    Dotmister's Avatar
    May 2008
    898 Posts
    Why do you care if it has C like syntax?
    I find it much easier to quickly scan than other languages (perl, ruby etc), I'm comfortable with it and I'm not looking to put hundreds of hours into learning a new language for this one project - yet it'd be good experience not to use PHP.

    I respect that many people prefer other types of language, but it's not what I'm looking for.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1Funny Funny x 1 (list)

  9. Post #1689
    italian
    TerabyteS_'s Avatar
    June 2011
    2,645 Posts
    How do you develop a new world of possibilities? It is the importance of tinkering with new ideas and the potential that they bear. Whenever you find yourself thinking, it's not just the idea that matters, but the entire process behind it. Do not just look at things directly, but feel their shape and form and become a part of them. No new things have the same significance as what matters the most to you. Believe in the work you do and never get ahead of yourself. When you start on new things, make sure to keep track of the old ones and never forgive a wasted possibility.
    Reply With Quote Edit / Delete Windows 7 Anonymous Proxy Show Events Artistic Artistic x 4Funny Funny x 2Dumb Dumb x 1Informative Informative x 1 (list)

  10. Post #1690
    Gold Member
    StinkyJoe's Avatar
    June 2006
    2,196 Posts
    How do you develop a new world of possibilities? It is the importance of tinkering with new ideas and the potential that they bear. Whenever you find yourself thinking, it's not just the idea that matters, but the entire process behind it. Do not just look at things directly, but feel their shape and form and become a part of them. No new things have the same significance as what matters the most to you. Believe in the work you do and never get ahead of yourself. When you start on new things, make sure to keep track of the old ones and never forgive a wasted possibility.

    nigga u high

    Edited:

    I'm sorry.
    Reply With Quote Edit / Delete Linux Portugal Show Events Funny Funny x 14 (list)

  11. Post #1691
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Hi again guys, I've got a few questions about content management systems since I'm doing a full-cycle (mostly) front-end job for an old buddy of mine.

    He's a fellow who wants to publish videos on both YouTube and show them on his site, along with some game articles and reviews he writes with a small staff for a little more than just fun.

    Now back when I was far more active in web development, everyone and their grandmother used Wordpress, and it was fair for a project like this.

    My questions are, has the industry changed much with their infatuation over Wordpress? Should I still be using a heavy skinning approach for my client like always with WP stuff? Are there any better alternatives out there that are popular or extremely fantastic in general? Should I be using Tumblr for something like this, or any other existing on-site publishing platform?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  12. Post #1692
    jung3o's Avatar
    October 2011
    2,125 Posts
    nigga u high

    Edited:

    I'm sorry.
    Hi Stinky. Do you look at your PMs?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  13. Post #1693
    I find it much easier to quickly scan than other languages (perl, ruby etc), I'm comfortable with it and I'm not looking to put hundreds of hours into learning a new language for this one project - yet it'd be good experience not to use PHP.

    I respect that many people prefer other types of language, but it's not what I'm looking for.
    You know you can use curly brackets in ruby if you want to right? The syntax for the languages you listed is not even remotely dissimilar enough to take "hundreds of hours". If you want good experience, step outside your comfort zone, maybe you'll find something better than what you've been using.
    Reply With Quote Edit / Delete Mac United States Show Events

  14. Post #1694
    adamjon858's Avatar
    July 2007
    1,282 Posts
    This...is...awesome: http://vim-adventures.com/

    Edited:

    Sorry if this has been covered before, but:

    What are the most widely used / new & upcoming methods of server side web development which aren't PHP yet still have a C-like syntax?
    (node.js I suppose, are there any others?)

    I'll be developing on windows and hosting on linux, so support for both platforms is required.
    (takes cover)

    C# is actually kind of awesome.
    Reply With Quote Edit / Delete Mac United States Show Events Agree Agree x 5Informative Informative x 1 (list)

  15. Post #1695
    Gold Member
    toaster468's Avatar
    January 2010
    3,241 Posts
    https://github.com/toaster468/FP2RSS

    Finally found the time to update my repo. Any critiques for my coding? (Other than PHP)

    Edited:

    Wow I totally forgot that half of my comments are outdated/completely off topic.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  16. Post #1696
    jung3o's Avatar
    October 2011
    2,125 Posts
    https://github.com/toaster468/FP2RSS

    Finally found the time to update my repo. Any critiques for my coding? (Other than PHP)

    Edited:

    Wow I totally forgot that half of my comments are outdated/completely off topic.
    you have 2 functions doing basically the same thing
    https://github.com/toaster468/FP2RSS...ter/fp2rss.php

    Edited:

    When I did a FP browser for fun, here is what i did

    function fp_start($action,$auth,$extra = NULL){ // $auth has both username and password together
    	$ch = curl_init();
    	curl_setopt($ch,CURLOPT_URL,'https://api.facepun.ch/?action='.$action.$auth.$extra);
    	curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    	$result = curl_exec($ch);
    	curl_close($ch);
    	return json_decode($result, true);
    }
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  17. Post #1697
    Meow :3
    Ac!dL3ak's Avatar
    July 2005
    6,080 Posts
    you have 2 functions doing basically the same thing
    https://github.com/toaster468/FP2RSS...ter/fp2rss.php

    Edited:

    When I did a FP browser for fun, here is what i did

    function fp_start($action,$auth,$extra = NULL){ // $auth has both username and password together
    	$ch = curl_init();
    	curl_setopt($ch,CURLOPT_URL,'https://api.facepun.ch/?action='.$action.$auth.$extra);
    	curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
    	$result = curl_exec($ch);
    	curl_close($ch);
    	return json_decode($result, true);
    }
    now write that using only TCP Streams
    Reply With Quote Edit / Delete Linux United Kingdom Show Events

  18. Post #1698
    Gold Member
    Torekk's Avatar
    November 2006
    2,793 Posts
    can somebody tell me how vizze.net/dm/ looks? I'm nowhere near even close to finishing but i'm working with a bigger resolution and things tend to look fucked on smaller resolutions
    Seems like, I currently have a 17" 1280x1024 screen, looks like this to me:
    Reply With Quote Edit / Delete Windows 7 Germany Show Events

  19. Post #1699
    jung3o's Avatar
    October 2011
    2,125 Posts
    can somebody tell me how vizze.net/dm/ looks? I'm nowhere near even close to finishing but i'm working with a bigger resolution and things tend to look fucked on smaller resolutions
    you know you can just test it by making your web browser smaller or pressing ctrl++ or Ctrl+- (Ctrl+0 to set back to normal)
    Reply With Quote Edit / Delete Windows 7 United States Show Events Disagree Disagree x 4 (list)

  20. Post #1700
    Gold Member
    Torekk's Avatar
    November 2006
    2,793 Posts
    you know you can just test it by making your web browser smaller or pressing ctrl++ or Ctrl+- (Ctrl+0 to set back to normal)
    You're talking about the page zoom, to actually see the website smaller he'd have to resize the browser window. There's a few addons for chrome & firefox for that though, if you look around a bit.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Agree Agree x 1Informative Informative x 1 (list)

  21. Post #1701
    Gold Member
    Mr_Razzums's Avatar
    December 2005
    4,546 Posts
    Currently working on a .net project for the city that keeps track of dead homeless people.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Useful Useful x 5Funny Funny x 4Friendly Friendly x 1 (list)

  22. Post #1702
    Gold Member
    Bomber9900's Avatar
    December 2008
    2,848 Posts
    Seems like, I currently have a 17" 1280x1024 screen, looks like this to me:
    Thanks, looks like I'll have to try an alternative to what i'm currently doing then.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events

  23. Post #1703
    adamjon858's Avatar
    July 2007
    1,282 Posts
    Has anyone used Knockout JS before? I was using Backbone for a project I'm working on but I really don't need MVC, I just need a nicer way than jquery of auto-updating lots of info on the page.
    Reply With Quote Edit / Delete Mac United States Show Events

  24. Post #1704
    Has anyone used Knockout JS before? I was using Backbone for a project I'm working on but I really don't need MVC, I just need a nicer way than jquery of auto-updating lots of info on the page.
    Using it at work right now and I love it.
    Reply With Quote Edit / Delete Mac United States Show Events

  25. Post #1705
    Gold Member
    antiChrist's Avatar
    March 2011
    566 Posts
    http://xoom3r.net/

    Working on my portfolio website

    Basically some HTML with no fancy jQuery
    Reply With Quote Edit / Delete Windows 7 Israel Show Events Artistic Artistic x 1 (list)

  26. Post #1706
    rookwood101's Avatar
    September 2011
    253 Posts
    http://xoom3r.net/

    Working on my portfolio website

    Basically some HTML with no fancy jQuery
    No fancy JQuery?! Not from what I see:

    Code:
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    			<script type="text/javascript">
    			var scrollSpeed = 35;
    			var current = 0;
    			var direction = 'h';
    			function bgscroll(){
    				current -= 1;
    				$('div.clouds').css("backgroundPosition", (direction == 'h') ? current+"px 0" : "0 " + current+"px");
    			}
    			 setInterval("bgscroll()", scrollSpeed);	
    			</script>
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Zing Zing x 3Disagree Disagree x 1 (list)

  27. Post #1707
    secretly a furry
    Jelly's Avatar
    April 2011
    2,022 Posts
    No fancy JQuery?! Not from what I see:

    Code:
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    			<script type="text/javascript">
    			var scrollSpeed = 35;
    			var current = 0;
    			var direction = 'h';
    			function bgscroll(){
    				current -= 1;
    				$('div.clouds').css("backgroundPosition", (direction == 'h') ? current+"px 0" : "0 " + current+"px");
    			}
    			 setInterval("bgscroll()", scrollSpeed);	
    			</script>
    That's bordering on shit jQuery.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Agree Agree x 2 (list)

  28. Post #1708
    Gold Member
    jaybuz's Avatar
    May 2006
    5,516 Posts
    I the only bad thing I can see with that code is the fact that the DOM is being searched for div.clouds every time it needs to change the background position instead of caching it.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events

  29. Post #1709
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    setInterval, setInterval with string argument, leaks variables into the global scope,
    Reply With Quote Edit / Delete Mac Australia Show Events

  30. Post #1710
    secretly a furry
    Jelly's Avatar
    April 2011
    2,022 Posts
    There's an animate for a reason. :~)

    Edited:

    Fuck off Charlie, I'm not a furry.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Funny Funny x 8Disagree Disagree x 2 (list)

  31. Post #1711
    italian
    TerabyteS_'s Avatar
    June 2011
    2,645 Posts
    Fuck off Charlie, I'm not a furry.
    what
    Reply With Quote Edit / Delete Windows XP Anonymous Proxy Show Events

  32. Post #1712
    Gold Member
    Bomber9900's Avatar
    December 2008
    2,848 Posts
    http://vizze.net/blog - got bored and am working on a simple blog
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Dumb Dumb x 2 (list)

  33. Post #1713
    RusselG's Avatar
    February 2011
    608 Posts
    title
    Reply With Quote Edit / Delete Windows 7 Australia Show Events

  34. Post #1714
    jung3o's Avatar
    October 2011
    2,125 Posts
    charlie should've put a link on it to some furry site or something.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 4Winner Winner x 1 (list)

  35. Post #1715
    Dennab
    February 2012
    2,299 Posts
    charlie should've put a link on it to some furry site or something.
    Has anyone got a dollar spare?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Funny Funny x 8 (list)

  36. Post #1716
    hzy
    Gold Member
    hzy's Avatar
    January 2009
    1,944 Posts
    Currently converting ~30,000 words worth of word documents into markdown.
    Reply With Quote Edit / Delete Mac Australia Show Events Agree Agree x 1Disagree Disagree x 1Funny Funny x 1 (list)

  37. Post #1717
    Dennab
    February 2012
    2,299 Posts



    PHP master!
    No, seriously, I'm rewriting this in Python and doing it properly when I get the chance.

    Code:
    <?php if(!isset($_GET["q"])) { ?>
    <html>
    	<body>
    +Christopher | <b>Search</b> | Images | Maps | Play | YouTube<br/>
    --------------------------------------------------------------------------------<br/><br/><b>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[<input type='text' name='q' size='40'/>]<br/><br/><br/>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' value='Google Search'/>
    </form>
    </body>
    </html>
    <?php } else { ?>
    <html>
    	<body>
    +Christopher | <b>Search</b> | Images | Maps | Play | YouTube<br/>
    --------------------------------------------------------------------------------<br/>
    <form method="get">
    Google Search&nbsp;[<input type='text' name='q' size='40' value='<?php echo $_GET["q"]; ?>'/>]&nbsp;&nbsp;&nbsp;&nbsp;<input type='submit' value='Search'/>
    </form><br/><br/>
    
    <?php
    
    $query = json_decode(file_get_contents("http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=".urlencode($_GET["q"])."&start=4"));
    if($query->responseData != 'null') {
    	$results = $query->responseData->results;
    	foreach($results as $result) {
    		echo "<a href='".$result->url."'>".$result->titleNoFormatting."</a><br/>".$result->content."<br/><br/>";
    	}
    }
    ?>
    	</body>
    </html>
    <?php } ?>
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 5 (list)

  38. Post #1718
    Dotmister's Avatar
    May 2008
    898 Posts



    PHP master!
    No, seriously, I'm rewriting this in Python and doing it properly when I get the chance.
    If you did this for real, turning a website into that format that'd be awesome
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  39. Post #1719
    Dennab
    February 2012
    2,299 Posts
    If you did this for real, turning a website into that format that'd be awesome
    I'd preferably not make it a website, but a telnet BBS.
    Its something to think about once my Raspberry Pi arrives.

    Edited:

    I'm sick to death of PHP & Javascript, I think its time to play with a few real languages.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  40. Post #1720
    italian
    TerabyteS_'s Avatar
    June 2011
    2,645 Posts
    oh god somebody bought me a title yay
    Reply With Quote Edit / Delete Windows 7 Anonymous Proxy Show Events Useful Useful x 1 (list)