• What are you working on? v6
    4,671 replies, posted
[QUOTE=KmartSqrl;33073991]The bonus with something like slim is that you can keep that simple syntax the entire time. Which one of these is cleaner and easier to read/scan quickly? [IMG]http://i.imgur.com/k3xyV.png[/IMG][/QUOTE] As cool as that looks, I think I would still prefer to use plain HTML. It's easier to read but I prefer the structure and organization of tagged/wrapped code. I feel like I'd get lost and be unsure of whether I was still in an element or not.
[QUOTE=Kopimi;33074061]As cool as that looks, I think I would still prefer to use plain HTML. It's easier to read but I prefer the structure and organization of tagged/wrapped code. I feel like I'd get lost and be unsure of whether I was still in an element or not.[/QUOTE]It's all about the indentations if I remember from HAML.
Yeah it's all indentation based, and when you have the vertical indentation markers that sublime has it's incredibly easy to tell what is inside of what.
[QUOTE=KmartSqrl;33074392]Yeah it's all indentation based, and when you have the vertical indentation markers that sublime has it's incredibly easy to tell what is inside of what.[/QUOTE] oh wow really that's a neat idea
[QUOTE=KmartSqrl;33073991]The bonus with something like slim is that you can keep that simple syntax the entire time. Which one of these is cleaner and easier to read/scan quickly? [IMG]http://i.imgur.com/k3xyV.png[/IMG][/QUOTE] I can see the benefits but I'm too lazy to take it to that level. BTW, it's recommended to put your charset tag before your title tag to prevent possible XSS attacks.
It's generally supposed to be one of the first things you declare, if not the first thing, in the first place.
[QUOTE=jaybuz;33077463]I can see the benefits but I'm too lazy to take it to that level. BTW, it's recommended to put your charset tag before your title tag to prevent possible XSS attacks.[/QUOTE] All I had to do was add slim to my gemfile, do a bundle install and change "erb" to "slim" where I'm rendering my views (using sinatra). No amount of laziness prevents that from being done :P No user submitted data is going to be displayed anywhere. It's pretty much just a static site with an email form so no need to worry about XSS, but yeah I should be declaring that first.
I personally hold less than no love for pythonic indentation control. I can see the benefit but every time I leave a computer to do my thinking for me I'm making myself vulnerable to cockups not of my own design. There was a poster on the wall of my computer science classroom in high school, reading "To err is human. To really mess things up takes a computer." So, Mr. Computer, I will tell you explicitly where my blocks of code end and begin, and you shall obey. That and I'm very comfortable with my curly braces thank you very much.
The indentation does tell it explicitly where your tags open and close. There is no way that's going to fuck anything up with a markup language like HTML unless [B]you[/B] make a mistake (which would be akin to forgetting to close a tag with regular html) or don't understand what you are doing in the first place. In fact I'd love to hear what advantage regular html has over something like HAML or Slim.
You see exactly what you're having the browser parse without having to learn something new. I have enough stuff on my plate; I'm not a fan of learning something obscure to speed up production by a negligible amount if I have to lose more time just to get my head around it's syntax, no matter how easy it is. [editline]1st November 2011[/editline] [code]!!! %html{ :xmlns => "http://www.w3.org/1999/xhtml", :lang => "en", "xml:lang" => "en"} %head %title BoBlog %meta{"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8"} %link{"rel" => "stylesheet", "href" => "main.css", "type" => "text/css"} %body #header %h1 BoBlog %h2 Bob's Blog #content - @entries.each do |entry| .entry %h3.title= entry.title %p.date= entry.posted.strftime("%A, %B %d, %Y") %p.body= entry.body #footer %p All content copyright © Bob [/code] Holy shit, what the fuck is this? Slim looks sane, but you call this an advantage over HTML?
I honestly don't think that HAML or Slim are complex enough that seeing what the browser is parsing is going to really come in the play in practice. I have yet to look at a HAML or a Slim template and think "what does this html look like". It's immediately apparent as soon as you spend 5-10 minutes working with it. Clean readable code saves more production time than just typing, and it's pretty handy to have your HTML built with the same CSS selectors that you're using to style your content and potentially for things like jQuery. HAML isn't obscure, it's well known in the ruby community. Slim is heavily influenced by HAML (and I prefer Slim), but in my opinion HAML's syntax is not really something you need to "get your head around". Regular tags are prefixed by a %, everything else is CSS selectors to create tags. Hashes to define attributes (which you likely already know if you're using HAML since you're probably using ruby if you're using HAML). An = means you're echoing variables and - is to evaluate code. What is confusing about that code you posted?
[QUOTE=KmartSqrl;33082987]I honestly don't think that HAML or Slim are complex enough that seeing what the browser is parsing is going to really come in the play in practice. I have yet to look at a HAML or a Slim template and think "what does this html look like". It's immediately apparent as soon as you spend 5-10 minutes working with it. Clean readable code saves more production time than just typing, and it's pretty handy to have your HTML built with the same CSS selectors that you're using to style your content and potentially for things like jQuery. HAML isn't obscure, it's well known in the ruby community. Slim is heavily influenced by HAML (and I prefer Slim), but in my opinion HAML's syntax is not really something you need to "get your head around". Regular tags are prefixed by a %, everything else is CSS selectors to create tags. Hashes to define attributes (which you likely already know if you're using HAML since you're probably using ruby if you're using HAML). An = means you're echoing variables and - is to evaluate code. What is confusing about that code you posted?[/QUOTE]Slim is fine, HAML just looks weird as fuck and overcomplicated. [editline]2nd November 2011[/editline] I mean, it looks like even more typing. [editline]2nd November 2011[/editline] And thinking. [editline]2nd November 2011[/editline] Thinking is not good for you.
[url]http://mrfrisby.com/[/url] Best example of responsive web design I've seen yet.
[QUOTE=iamacyborg;33084348][url]http://mrfrisby.com/[/url] Best example of responsive web design I've seen yet.[/QUOTE] ahahaaha that made me lose it laughing.
[QUOTE=H4Z3Y;33084400]ahahaaha that made me lose it laughing.[/QUOTE] The commented JS is even funnier. [code] // Show a big fuck off message when some designer cunt starts resizing my shit $(window).resize(function(){ $('.wanker').show(100); $("body").css("overflow", "hidden"); }); [/code]
[QUOTE=TerabyteS_;33084101]Slim is fine, HAML just looks weird as fuck and overcomplicated. [editline]2nd November 2011[/editline] I mean, it looks like even more typing. [editline]2nd November 2011[/editline] And thinking. [editline]2nd November 2011[/editline] Thinking is not good for you.[/QUOTE] What is overcomplicated about it? It's definitely not more typing: [url]http://haml-lang.com/tutorial.html[/url] Has anyone that is saying HAML is complicated actually sat down and tried it out?
I thought it was kind of odd when I first started, but after using it for a couple of minutes I realized that it's much faster than typing out HTML. Just sit down with it for a minute and I'll all make sense.
[QUOTE=KmartSqrl;33082987]What is confusing about that code you posted?[/QUOTE] It's not confusing, in fact, if it helps you speed up productivity, that's great; all I'm saying is at first glance, it looks like shit, you actually have to do more typing as you append more properties to tags, and it just feels like a waste of my time to learn something like HAML or Slim. [editline]2nd November 2011[/editline] [QUOTE=KmartSqrl;33087691]It's definitely not more typing: [url]http://haml-lang.com/tutorial.html[/url][/QUOTE] It literally is more typing based on how many attributes you have on a tag. It starts being initially less typing, then increases beyond what would be needed if you just typed out the beginning and ending tags.
[QUOTE=amcfaggot;33087989]It literally is more typing based on how many attributes you have on a tag. It starts being initially less typing, then increases beyond what would be needed if you just typed out the beginning and ending tags.[/QUOTE]That's exactly what I meant earlier, even though I fail at expressing myself.
In theory yes, but in practice how many attributes do you actually have on most of your tags other than class or id (which don't need to go in the hash for the attributes since you can do %p#id.classOne.classTwo)? Probably one or two.
[QUOTE=KmartSqrl;33089184]In theory yes, but in practice how many attributes do you actually have on most of your tags other than class or id (which don't need to go in the hash for the attributes since you can do %p#id.classOne.classTwo)? Probably one or two.[/QUOTE]Forms
I'd be willing to bet that in most cases across an entire site you're still not creating enough forms to offset the number of characters saved by using HAML for all the other tags. And like I said earlier character count isn't the biggest time saver from using something like this the readable, succinct markup is.
[img]http://i.imgur.com/FpphU.png[/img] bored [img]http://i.imgur.com/EyE7G.png[/img] here it is with a mediocre jellyfish
Hello ifaux, your Windows 7 badge under your user profile threw me off. Anyway, logo looks nice, but I'd like to see it a bit larger. Really nice colours as well. [editline].[/editline] In other news, I have a job interview today. The job position is Web UI designer/developer, and if I get the job I will be overhauling the design of a rather large website/forum. It's going to be a lot of work, but then again I'm just focusing on the interview for now :tinfoil: The company contacted me on my second last day of university. Talk about perfect timing.
[QUOTE=BrettJay;33096724]Hello ifaux, your Windows 7 badge under your user profile threw me off. Anyway, logo looks nice, but I'd like to see it a bit larger. Really nice colours as well.[/QUOTE] you want it [i]larger[/i]? but everything looks great when it's small ;_;
I get a hard-on when I see the crisp edges on logos.
[QUOTE=pepsi cola;33096891]you want it [i]larger[/i]? but everything looks great when it's small ;_;[/QUOTE] especially your penis, because it makes me feel better about my own
[t]http://i.imgur.com/ECoBv.png[/t] [t]http://i.imgur.com/S5Isi.png[/t] Trying to make the things look a bit more, uh, not suck. It also needs more content, but I'll push stuff into mouseovers for the individual technology stuff. Give me your hardest criticism, please. No holding back. I got some critical feedback from other really close webdev buddies, and it really helps. [editline]3rd November 2011[/editline] Eh, it doesn't help that the second image isn't actually a finished draft, so two issues that I'm already aware of are terrible contrast on the header "am" logo deal, and the text at the bottom being basically black on black. But, still, anything you can yell at me for would be great.
[QUOTE=amcfaggot;33100240][t]http://i.imgur.com/ECoBv.png[/t] [t]http://i.imgur.com/S5Isi.png[/t] Trying to make the things look a bit more, uh, not suck. It also needs more content, but I'll push stuff into mouseovers for the individual technology stuff. Give me your hardest criticism, please. No holding back. I got some critical feedback from other really close webdev buddies, and it really helps. [editline]3rd November 2011[/editline] Eh, it doesn't help that the second image isn't actually a finished draft, so two issues that I'm already aware of are terrible contrast on the header "am" logo deal, and the text at the bottom being basically black on black. But, still, anything you can yell at me for would be great.[/QUOTE] i hate it and i hate you _________________________________________________ [B]signature powered by [url]http://www.godaddy.com/[/url][/B] Despite your mental deficiencies, and the fact your a total GEEK, you make my heart start racing and my body shiver down to my feet. - Friedrich Nietzsche _________________________________________________
[QUOTE=amcfaggot;33100240][t]http://i.imgur.com/ECoBv.png[/t] [t]http://i.imgur.com/S5Isi.png[/t] Trying to make the things look a bit more, uh, not suck. It also needs more content, but I'll push stuff into mouseovers for the individual technology stuff. Give me your hardest criticism, please. No holding back. I got some critical feedback from other really close webdev buddies, and it really helps. [editline]3rd November 2011[/editline] Eh, it doesn't help that the second image isn't actually a finished draft, so two issues that I'm already aware of are terrible contrast on the header "am" logo deal, and the text at the bottom being basically black on black. But, still, anything you can yell at me for would be great.[/QUOTE]Too much contrast hurts poor little Jhonny's eyes. [editline]3rd November 2011[/editline] But the concept is cool. I'd replace black with light orange
Sorry, you need to Log In to post a reply to this thread.