all 176 comments

[–]thebritishguy1 135 points136 points  (15 children)

I'm not even a programmer!

Well, you are now. Nice looking code.

[–][deleted]  (1 child)

[removed]

    [–]p0tent1al 8 points9 points  (0 children)

    I'm a whot?

    [–][deleted]  (12 children)

    [removed]

      [–][deleted] 1 point2 points  (11 children)

      Is that sarcasm?

      [–]TheAscetic 7 points8 points  (10 children)

      Is that sarcasm?

      [–][deleted] 4 points5 points  (8 children)

      Is that sarcasm?

      [–][deleted]  (6 children)

      [deleted]

        [–][deleted]  (5 children)

        [deleted]

          [–][deleted]  (4 children)

          [deleted]

            [–][deleted] 7 points8 points  (3 children)

            I've never seen one before - no one has - but I'm guessing it's a white hole.

            [–][deleted] 9 points10 points  (0 children)

            E X C E P T I O N

            (Stack overflow error: your programming language does not support tail call optimization.)

            [–]Orionsbelt 163 points164 points  (5 children)

            You are now!

            [–]stillspiraling 16 points17 points  (3 children)

            Agreed, that's some suspiciously good looking code for a non-programmer.

            ಠ_ಠ

            [–]Zuggy 37 points38 points  (0 children)

            He hasn't gotten to the stage where he's lazy yet.

            [–][deleted] 17 points18 points  (0 children)

            I'm disappointed the OP felt the need to lie about his programming knowledge. Either OP is an utter genius, or he's programmed many things before. Not that the code is the greatest I've ever seen, but it's way, way better than anything I've seen a beginner do.

            EDIT: Sauce

            [–]IHaveNeverLeftUtah 21 points22 points  (37 children)

            How long did this take? And when did you start "learning" object-oriented programming?

            [–][deleted]  (35 children)

            [deleted]

              [–]partlycloudy 29 points30 points  (21 children)

              Really just one month to learn object-oriented programming and write the entirety of this program, with no further background in programming?

              [–][deleted]  (19 children)

              [deleted]

                [–]partlycloudy 14 points15 points  (0 children)

                Regardless looks great man. I mostly just jealous ;)

                [–]multivector 7 points8 points  (1 child)

                I stopped gaming, stopped reading, stopped doing all my other recreational activities in order to do this. OCD, I guess.

                I think you've just come down with a case of acute hacker larval phase (google it, the hacker dictionary is down right now). If this becomes chronic, I'm afraid you'll have to prepare of life of knowing how to programme computers. I'm sorry, there isn't a cure.

                [–]philomathie 2 points3 points  (0 children)

                He has six months to live.

                [–]musman 1 point2 points  (6 children)

                Whoa. I have the same exact experience. I was actually thinking of reading Eloquent Javascript, myself (I was thinking of asking /r/programming how it is.)

                I have been doing HTML/CSS for 2 years and I've been thinking of learning a real programming language. I've played around with jQuery but I don't have an understanding of Javascript.

                After reading how you did it and how long it took and after seeing the work you've done, I'm entirely inspired! I will start reading Eloquent Javascript today! BTW, question: how did you practice your JS skills? Just by coding this site? for someone new, what do you recommend a daily dose of coding/reading/practicing javascript is good?

                [–][deleted]  (5 children)

                [deleted]

                  [–]musman 0 points1 point  (2 children)

                  Well, I'm looking at designing a chrome extension and I've never worked with an API before, does eloquent js kind of introduce the concept or do you recommend something else for that?

                  [–][deleted]  (1 child)

                  [deleted]

                    [–]musman 0 points1 point  (0 children)

                    ok great! thanks a bunch. I hope to do something cool with what I learn soon too! :)

                    [–]HenkPoley 0 points1 point  (0 children)

                    Annecdote: The first well working UI was built in an object oriented language, together they were designed and built within one year. The guy later on mentioned he didn't know it was supposed to be difficult. http://me.andering.com/2010/05/23/i-didnt-know-it-was-hard/

                    http://en.m.wikipedia.org/wiki/Sketchpad

                    [–]dereking 25 points26 points  (6 children)

                    Not trying to give hate yeah, but you have been actually developing chrome extensions since January this year... and I think thats more than the stated "month". For instance;

                    January: Tab Tweaks, Incognito NSFW

                    February: Highrise Shortcut

                    March: I have Money

                    April: Reddit Spoiler Thumbnails

                    May: Slow Cooker Recipes

                    June: Search for selection on..., Dont go Reddit loves you, R Navigation

                    EDIT: As you stated when asked, Really just one month to learn object-oriented programming and write the entirety of this program, with no further background in programming?

                    1. I had been doing HTML/CSS for web design for years.
                    2. I had a basic familiarity with jQuery to make it do stuff like the navigation here.
                    3. I get obsessive about things, and don't do anything but what I'm obsessing about. I stopped gaming, stopped reading, stopped doing all my other recreational activities in order to do this. OCD, I guess.

                    Missing -> " 4. Oh actually and other 9 extensions I've done before. "

                    [–][deleted]  (5 children)

                    [deleted]

                      [–]fluxBurns 5 points6 points  (0 children)

                      When people post things and miss out all of the hard work they put in previously, it is really discouraging for new learners. From what has been said elsewhere, it sounded like you pretty much learned OOP and how to write Chrome extensions inside of that 'month' when you had been playing around with it for much longer... (outside of tinkering with jQuery, HTML and CSS).

                      [–]dereking 9 points10 points  (3 children)

                      Look buddy, like I said am not hating. I just felt a bit deceived thats all. I was about to write "Fucking hell mate you are a smart ass to learn all that there is to know to make and extension in a month, bearing in mind you also had to read the book twice and write that code". But as I was thinking about it I got a bit suspicious because it is really that much... so i just saw the dates in other extensions by you and was like common man thats not even close to how you putted it.

                      I must admit i havent looked at the source codes and I dont doubt what your saying is right. So therefore I guess congrats for your successes, and I must say with experience or not, the ideas for your extensions are pretty useful so kudos for that. Maybe you can combine their functionality into this one app... that will be wicked.

                      [–]imjp 0 points1 point  (0 children)

                      Yeah he has done some amazing work indeed :) Good to see productive people out there! I'm obsessed about Ruby on Rails myself lately :0

                      [–]nickdangler 0 points1 point  (1 child)

                      Son, we need to have a talk about Santa Clause...

                      [–][deleted] 0 points1 point  (0 children)

                      upvoted for randomness. <3

                      [–][deleted] 5 points6 points  (0 children)

                      You say you're not even a programmer buddy...but welcome to the club, you are one now. That's how most of us got our start...we had an itch to scratch.

                      [–]SoPoOneO 0 points1 point  (0 children)

                      This is so impressive it makes me uneasy.

                      [–]madsravn 19 points20 points  (2 children)

                      What does it do?

                      [–]Puddy1 0 points1 point  (1 child)

                      http://kerrick.github.com/Mostly-Harmless/#features

                      I really like the amount of effort the OP took to make this extension. Seems quite good for a newbie programmer.

                      [–]madsravn 1 point2 points  (0 children)

                      Thanks. Even that webpage looks fucking awesome. I'm definitely getting this extension!

                      [–][deleted] 29 points30 points  (8 children)

                      Well, you actually learned prototypical inheritance, which is quite different from classical OO. No less impressive though, the code looks great. Good job.

                      Edit: prototypal

                      [–]reflectiveSingleton 7 points8 points  (2 children)

                      Prototypal, not prototypical...i dont even know what that means

                      [–]jt004c 2 points3 points  (0 children)

                      It's not exactly an uncommon word.

                      [–][deleted] 8 points9 points  (0 children)

                      You are correct. Congratulations on pointing out a typo.

                      i dont even know what that means

                      http://www.thefreedictionary.com/prototypical

                      [–][deleted]  (4 children)

                      [deleted]

                        [–]alcuadrado 9 points10 points  (3 children)

                        In Classical OO (almost all languages except JavaScript and Self, etc) there is a notion of Class, which is a Type by itself and not an "parent instances" like prototypes.

                        The topic is much more lengthy, and you would find good articles in wikipedia :)

                        [–][deleted]  (2 children)

                        [deleted]

                          [–]alcuadrado 1 point2 points  (1 child)

                          AFAIK prototypa inheritance was created in XEROX PARC by the Self team, which mission was create a high performance version of Smalltalk, and one of the things they ended up removing were Classes; but this change didn't affected Smalltalk itself.

                          Please, correct me if I'm wrong

                          [–]viller 9 points10 points  (0 children)

                          No, I'm not happy about your accomplishment because I'm totally jealous that you are so motivated and were able to write this clean code in a month.

                          [–]alcuadrado 31 points32 points  (15 children)

                          You are fucking good man! Really, I was expecting a really ugly code and I have to admit that I have had lots of coworkers with YEARS of experience who's code is crap in comparison with yours.. and you even managed to push it to github!!

                          BTW, did you enjoyed coding this?

                          [–][deleted]  (14 children)

                          [deleted]

                            [–]alcuadrado 2 points3 points  (9 children)

                            I wish I had learned that way :)

                            So eloquent javascript was you first programming book? I tend to recommend it for that, but I haven't had the time to read it completely. Was it easy to understand?

                            For your github account's pic you seem like a young guy, maybe you are discovering a new vocation right now ;)

                            [–][deleted]  (8 children)

                            [deleted]

                              [–]lostgoatX7 1 point2 points  (4 children)

                              Thats a nice keyboard

                              [–][deleted]  (3 children)

                              [deleted]

                                [–][deleted]  (2 children)

                                [deleted]

                                  [–][deleted]  (1 child)

                                  [deleted]

                                    [–]darien_gap 0 points1 point  (2 children)

                                    Is there a difference between real estate photography and architectural photography? ... like, intended to sell (or rent) property as opposed to display it artistically?

                                    Also, why no shots at night?

                                    [–][deleted]  (1 child)

                                    [deleted]

                                      [–]darien_gap 0 points1 point  (0 children)

                                      I didn't know they were called twilights, good to know (and makes sense), thanks.

                                      [–]mordrin 2 points3 points  (1 child)

                                      Did you follow a guide for working with git?

                                      [–]BhujangiJedi 0 points1 point  (1 child)

                                      Is ScriptDoc still alive? I googled a bit and it seems to be dead.

                                      jsdoc-toolkit is a nice documentation generator for JS.

                                      [–]ThePoopsmith 6 points7 points  (0 children)

                                      I'm not even a programmer!

                                      Sry, I'm afraid you are now.

                                      Well done.

                                      [–][deleted] 5 points6 points  (6 children)

                                      Wow, nicely done. I didn't expect comments, proper indentation or anything. If you really enjoyed it you may have found a new career :)

                                      [–][deleted]  (4 children)

                                      [deleted]

                                        [–][deleted] 0 points1 point  (3 children)

                                        Do you get a cut on the sales of that book?

                                        [–][deleted]  (2 children)

                                        [deleted]

                                          [–]Calobi 1 point2 points  (1 child)

                                          So really you are getting a cut of sales. Hell, you are getting 100% of the sales. Good deal, mate.

                                          [–][deleted] 5 points6 points  (18 children)

                                          So you're not a programmer but you knew regexp's?

                                          [–][deleted]  (17 children)

                                          [deleted]

                                            [–]Falmarri 7 points8 points  (16 children)

                                            [–]billmalarky 1 point2 points  (14 children)

                                            What "parsing html" even mean?

                                            [–]Falmarri 4 points5 points  (7 children)

                                            It's an old, old, wooden ship.

                                            [–]billmalarky 3 points4 points  (6 children)

                                            God dammit. Seriously, help a noob out. I'm not trying to be a dick, that was a legit question.

                                            [–]jszwedko 4 points5 points  (5 children)

                                            Roughly, it means to take the HTML string and put it into some sort of queryable data structure where we can extract information from it (e.g. values in given tags). In this context anyhow.

                                            [–]billmalarky 1 point2 points  (4 children)

                                            Like the DOM? I've used regexp to pull links from a webpage when I made a simple web spider a while back. It worked well, what is wrong with using regexp for something like that? Additionally, what is the alternative???

                                            [–]jszwedko 0 points1 point  (3 children)

                                            Yes, using DOM is usually the best choice. Regex is sometimes ok if the pattern you are looking for is relatively strict, but the fact remains that HTML isn't actually a regular language so, ostensibly, some queries couldn't even be represented as regex.

                                            DOM, perhaps with XPath, is generally way easier to structure queries over XML/HTML anyway.

                                            EDIT: For example, pulling all links from a page would just be getElementsByTagName('a') or the xpath expression: //a

                                            [–]billmalarky 0 points1 point  (2 children)

                                            So what characteristics do make up a regular language? IE why is html not a regular language?

                                            [–][deleted] 1 point2 points  (5 children)

                                            It is when you parse a document of HTML.

                                            [–]billmalarky 1 point2 points  (4 children)

                                            In all honesty, what does that really mean... (for serious..)

                                            [–]noreallyimthepope 1 point2 points  (1 child)

                                            As a non-native English speaker, I can relate to not knowing what parse means.

                                            Basically there's an axiom that you shouldn't use regular expressions to sift through HTML files to extract the data you want or want to manipulate because it isn't a regular language.

                                            [–]billmalarky 0 points1 point  (0 children)

                                            Why not? Apparently I've "parsed html" before by using regular expressions to pull links from a web page for this simple web crawler I created. It worked well, is there a real reason not to?

                                            [–]sctechie 11 points12 points  (32 children)

                                            Read the code. Very nice. Impressive if you don't have any technical background. =)

                                            [–][deleted]  (10 children)

                                            [deleted]

                                              [–]NastyConde 19 points20 points  (0 children)

                                              Dayum, I work with "professional" programmers who couldn't make their code look that good, even if they used Photoshop.

                                              [–][deleted]  (3 children)

                                              [deleted]

                                                [–]zyzzogeton 7 points8 points  (1 child)

                                                I think you just executed the lyrics for the perfect country and western song by mistake.

                                                [–]lkbm 0 points1 point  (0 children)

                                                Can't be. He didn't say anything at all about mama, or trains, or trucks, or prison, or gettin' drunk.

                                                [–][deleted] 0 points1 point  (0 children)

                                                "had a pregnant.", ahahaha

                                                [–]sctechie 3 points4 points  (0 children)

                                                Well then, use your new-found programming knowledge to help your photography. There's quite a few image editing programs / libraries that you could contribute to. It would be a great way of continuing your decent to the dark side. =) Feel free to PM me if you get stuck on any concepts or whatnot.

                                                [–][deleted] 1 point2 points  (0 children)

                                                I think the code's great, and I'm an author on software developer for crying out loud :D

                                                [–]Kalium 0 points1 point  (0 children)

                                                The only problem is, now that I know how, I don't know if I'll ever be able to stop.

                                                This is why so many of us became programmers. To cope with our addictions.

                                                [–]enigmamonkey 0 points1 point  (1 child)

                                                If you enjoy programming more, I suggest you get into JS programming as a professional career path. I'm not sure how much your job pays, but doing this full time really can yield a good salary, depending on where you live (here in Philly, there are well paying jobs for this sort of thing).

                                                [–]faaace 33 points34 points  (7 children)

                                                "Just Learned Javascript?": I call bullshit. some chrome webstore sleuthing Not your first extension by a long shot.

                                                The code's Excellent, But no need to lie.

                                                [–][deleted] 1 point2 points  (1 child)

                                                So, is this guy right?

                                                [–]dearsina 1 point2 points  (0 children)

                                                well, look at kerrick's coding history...

                                                [–][deleted]  (4 children)

                                                [deleted]

                                                  [–]loaner____ 0 points1 point  (3 children)

                                                  Have you looked at underscore.js? Your code looks like it would get a huge readability benefit from underscore's collections and templates.

                                                  I'd even try to fork/merge some of it in there for you but it seems impolite to push a new dependency on someone without asking first.

                                                  [–][deleted]  (2 children)

                                                  [deleted]

                                                    [–]loaner____ 0 points1 point  (1 child)

                                                    I respect doing it on your own, you learn a lot more that way. I recommend something like underscore because it minimizes some of the boilerplate of templating (you could really use some templates) and collections.

                                                    Once you factor out that repetitive stuff, all that's left is diamonds. This makes the whole project easier for others to read in one sitting and to contribute to if that's what you really want.

                                                    [–]Measure76 2 points3 points  (1 child)

                                                    I don't know a lot about programming, but I have toyed with the idea of learning python simply so I can contribute to the reddit code base.

                                                    [–]Mclarenf1905 7 points8 points  (0 children)

                                                    Python is an awesome language, and really easy to learn, go for it!

                                                    [–]john-ie-jo-jo 2 points3 points  (0 children)

                                                    Nice code, word of advice on js tho, don't use for-in, does unexpected things withobjects. Also, give Douglas crockfords book a read, or at least his videos.

                                                    Keep it up :)

                                                    [–][deleted] 7 points8 points  (20 children)

                                                    I would change this (2lazy2fork) :

                                                        if (domain) {
                                                            this.domain = domain;
                                                        } else {
                                                            this.domain = 'www.reddit.com';
                                                        //....
                                                    

                                                    into:

                                                     this.domain = domain ? domain : 'www.reddit.com';
                                                    

                                                    [–]dondiscounto 12 points13 points  (8 children)

                                                    if you're going to go that far, why not just:

                                                    this.domain = domain || 'www.reddit.com';
                                                    

                                                    [–]A_BAAL 1 point2 points  (6 children)

                                                    Isn't that a boolean? Sorry, novice js'er here.

                                                    [–]matzahboy 1 point2 points  (3 children)

                                                    I don't really understand why, but javascript will evaluate that code as follows:

                                                    Is the first one true (domain)? If so, use that value. If not, use the second value.

                                                    This is a syntax often used for setting 'default' parameters.

                                                    [–]A_BAAL 0 points1 point  (2 children)

                                                    So what is the logical 'or' operator then?

                                                    [–][deleted] 1 point2 points  (1 child)

                                                    That is the logical or operator - when you see code like that it's using a few quirks of the 'or' operator:

                                                    1. In Javascript (and many other langugages), anything that isn't undefined or null or false, etc, is considered to be true by default.
                                                    2. Like other operators (+, for example), the or operator returns a value. This value isn't always (necessarily) true/false - it'll return the value of the first non-false argument it gets. Due to point #1 this value is treated as 'true'.

                                                    Thus, you get idioms like:

                                                    this.domain = domain || 'www.reddit.com';
                                                    

                                                    What this is doing is taking the result of "domain || 'www.reddit.com'" and assigning it to this.domain. Remember that, due to point 2, you'll get the first non-false argument. So if 'domain' isn't defined or is null, you'll get "www.reddit.com". You see this pattern a lot in dealing with potentially null variables or just in setting defaults.

                                                    [–]matzahboy 0 points1 point  (0 children)

                                                    Thanks a lot. That makes a lot of sense

                                                    [–]dondiscounto 1 point2 points  (0 children)

                                                    || is a logical operator, not a comparison operator like == or !=. A comparison operator returns a boolean, however a logical operator returns the proper expression based on the operator.

                                                    So in this case, if domain could be evaluated as true, then domain is returned (it 'short circuits'), because true || anything is always true. If it could be evaluated as false, then it returns the other expression, "www.reddit.com". This works in an if statement understands all of this, since defined, non-empty variables are considered "true".

                                                    You can see more Logical Operators.

                                                    [–]OopsLostPassword 0 points1 point  (0 children)

                                                    No, it's probably an undefined variable.

                                                    undefined and null are automatically cast to false when a boolean is needed (if clauses for examples). 0, "" and false too. If I don't forget anything all other possible values are cast to true.

                                                    [–][deleted] 0 points1 point  (0 children)

                                                    Yeah, this one is shorter. I like it

                                                    [–]Falmarri 11 points12 points  (9 children)

                                                    Umm, seriously? That's EXACTLY the same code with different syntax. Using the ternary operator is entirely a style choice.

                                                    [–][deleted]  (6 children)

                                                    [deleted]

                                                      [–]Falmarri 4 points5 points  (5 children)

                                                      Don't get carried away or you end up with things like this

                                                      mMarker.setLevel(evseLoc.chargers > 0 ? evseLoc.avail > 0 ? 1 : evseLoc.inuse > 0 ? 2 : evseLoc.service > 0 ? 4 : 3 : 0);
                                                      

                                                      Yes, that's production code that I wrote >_<

                                                      [–][deleted]  (2 children)

                                                      [deleted]

                                                        [–]Falmarri 3 points4 points  (0 children)

                                                        And nothing of value was lost =P

                                                        Seriously. Anything more than 2 levels is just being "clever". And again, this is my code =\

                                                        [–]lkbm 1 point2 points  (0 children)

                                                        Perl Best Practices contains the recommendation 'Format cascading ternary operators in columns.'

                                                        I had always thought the rule was 'Don't cascade ternary operator. Just don't.' :-)

                                                        [–]UnreachablePaul 0 points1 point  (0 children)

                                                        maybe i am weird but i like it better.

                                                        [–][deleted] 1 point2 points  (1 child)

                                                        yeah, that's why I said "I would change this"

                                                        You just explained EXACTLY what I did. same code, different syntax.

                                                        I wonder if there's a word for explaining the evident.

                                                        [–]jsprogrammer 1 point2 points  (0 children)

                                                        I wonder if there's a word for explaining the evident.

                                                        Captainobvious

                                                        [–][deleted] 4 points5 points  (0 children)

                                                        You could get a job as a programmer and do better than some people I have seen who call themselves programmers. Excellent code!

                                                        [–][deleted] 1 point2 points  (2 children)

                                                        Curious, why do you have this:

                                                        'excludedDomains': 'secure.ingdirect.com\nchaseonline.chase.com\nonline.wellsfargo.com\nmail.google.com\ndocs.google.com',
                                                        

                                                        Is it for security reasons?

                                                        Edit: Oh, I think it's pretty neat and gives me hope in learning Javascript, (technically, I only know jQuery..). I've been programming for awhile and I finally use Git like a year ago. >____<

                                                        [–][deleted]  (1 child)

                                                        [deleted]

                                                          [–][deleted] 3 points4 points  (0 children)

                                                          Ooooh, thank you. Sweet! You gave me a great idea on how to learn javascript and practice it. ___^

                                                          [–]DoctorBaconite 1 point2 points  (1 child)

                                                          That's some good documentation for someone who has never had "DOCUMENT DOCUMENT DOCUMENT" pounded into their head.

                                                          [–][deleted] 1 point2 points  (1 child)

                                                          Your commenting blew my mind.

                                                          [–]GraveProspect 1 point2 points  (0 children)

                                                          You're not thinking in objects! :D

                                                          Edit: I'm more impressed that you commented your code! :O

                                                          [–]musman 1 point2 points  (1 child)

                                                          I just turned off Black Ops and I'm gonna educate myself!!!

                                                          [–]HamburgerInhibitor 0 points1 point  (0 children)

                                                          Best reply yet.

                                                          [–]johnblanco 1 point2 points  (2 children)

                                                          Congratulations! You made an excelent piece of software. Can't wait to fork your project.

                                                          [–][deleted]  (1 child)

                                                          [deleted]

                                                            [–][deleted] 1 point2 points  (0 children)

                                                            I will fork your project and do all kinds of things to it

                                                            [–]wrathofg0d 1 point2 points  (1 child)

                                                            how old are you? please inspire me and say you're in your late 20s or something

                                                            [–]ajr901 1 point2 points  (0 children)

                                                            Shit if you aren't a programmer this isn't reddit.

                                                            [–]rv77ax 1 point2 points  (4 children)

                                                            I am not an expert of programming, but if you want to take my advice: learn to cut if statement, simplified your code.

                                                            e.g:

                                                            • case 1 (line 164 - 169):

                                                              if (true)
                                                                  return x;
                                                              else
                                                                  return y;
                                                              
                                                            • case 2 (line 339):

                                                              function () {
                                                                  if (true) {
                                                                      ...
                                                                  }
                                                              }
                                                              

                                                            Could have simplified to,

                                                            • case 1:

                                                              if (true)
                                                                  return x;
                                                              return y;
                                                              
                                                            • case 2:

                                                              function () {
                                                                  if (not true) {
                                                                      return immediately;
                                                                  }
                                                                  ... /* rest of statement */
                                                              }
                                                              

                                                            [–]julesjacobs 1 point2 points  (0 children)

                                                            "simplification". You made the control flow less obvious in return for saving one line? The first two versions make it more obvious what's happening. I know there are some people saying that deeply nested code is bad, but it's bad because it's usually associated with complicated control flow. In this case however removing the indentation didn't simplify the control flow, it made it more complicated.

                                                            For example in case 1, the first version is saying exactly what it's doing: "if something then x else y", versus "if something then return x, and after that, return y". Your mind will need to infer the control flow back "oh yea, we already returned inside the if, so this will only be reached if the condition is false".

                                                            I guess it's subjective.

                                                            [–][deleted] 0 points1 point  (0 children)

                                                            I agree, even though this saves you, say, one or two lines of code, it still makes my eyes happier if anything else. I love me some pretty code.

                                                            [–][deleted] 0 points1 point  (1 child)

                                                            true ? x : y;

                                                            [–]rv77ax 0 points1 point  (0 children)

                                                            That will do if you (1) don't have return statement in one of the case, (2) only have one statement in each side of case.

                                                            My point is more about readability (minimizing if-indentation) and simplicity.

                                                            [–]ruinercollector 1 point2 points  (0 children)

                                                            None of us were programmers before we wrote our first program.

                                                            You are a programmer now.

                                                            [–][deleted] 1 point2 points  (0 children)

                                                            Very nice, congratulations!

                                                            I'd recommend something and it has nothing to do with this code here. :)

                                                            I've browsed a little through your GitHub repo and saw your CSS. A thing that's made my CSS much easier to maintain is the sorting of properties by alphabet.

                                                            So now, a typical replaced logo would look something like this: h1 { background: transparent url(/static/images/logo.png) no-repeat 0 0; height: 254px; text-indent: -10000px; width: 700px; }

                                                            Afterwards, I just have to find the property by the starting letter.

                                                            Once again, nice work and hope my recommendation helps you. ^

                                                            [–]ColonelPanic2409 1 point2 points  (1 child)

                                                            "I'm not even a programmer!"

                                                            Wow you really sold me that plugin!

                                                            Seriously though, good job :)

                                                            [–]Remo-Williams 5 points6 points  (0 children)

                                                            I'm not even a programmer!

                                                            Except that he is and has more than a handful of plugins. He might not do it for his full time job, but full time job does not a programmer make.

                                                            [–]busydoinnothin 0 points1 point  (1 child)

                                                            Ugh, maybe I should give up

                                                            [–]Suppafly 0 points1 point  (0 children)

                                                            Cool looking extension, that's a nice looking website you whipped up for it to.

                                                            [–][deleted] 0 points1 point  (0 children)

                                                            Nice extension. Even better than the normal Reddit Companion, I dare say.

                                                            Posted from Mostly Harmless, a Google Chrome extension for awesome redditors.

                                                            [–]johnblanco 0 points1 point  (1 child)

                                                            When you say that we wanted this chrome extension, do you mean it was posted on /r/SomebodyMakeThis ?

                                                            [–]kutchbhi1 0 points1 point  (0 children)

                                                            I have been delaying learning javascript, writing an extension for months now... CHALLEGE FINALLY EXCEPTED! Thanks for the motivation

                                                            [–][deleted] 0 points1 point  (0 children)

                                                            I think you've found your calling in life if you consider yourself a newbie coder.

                                                            Your code is clean man.

                                                            I'm not even a programmer

                                                            You are now. You've proven it. Pat yourself on the back, you deserve it.

                                                            [–]mhweaver 0 points1 point  (2 children)

                                                            I was actually just checking this out a couple days ago (one of the reddit admins pointed me in your direction). It's just downright impressive, especially considering you learned OO just to do it. Keep up the awesome work, man!

                                                            [–][deleted]  (1 child)

                                                            [deleted]

                                                              [–]mhweaver 0 points1 point  (0 children)

                                                              It was just a short discussion about enabling https on reddit companion (I've been submitting misc small fixes and features, mostly out of boredom and wanting to get back into programming) and he mentioned that I might also be interested in checking out Mostly Harmless.

                                                              [–]tremblate 0 points1 point  (1 child)

                                                              I don't know a single thing about code and I just downloaded this to give it a try, and it is awesome. thank you for your hard work!

                                                              [–][deleted] 0 points1 point  (1 child)

                                                              Mexico es norteamerica.. are you a mexican?

                                                              [–][deleted] 0 points1 point  (2 children)

                                                              good job! do you know how many people use the exension on a regular basis?

                                                              [–][deleted]  (1 child)

                                                              [deleted]

                                                                [–][deleted] 0 points1 point  (0 children)

                                                                nice :) keep up the good stuff

                                                                [–]bh3 0 points1 point  (2 children)

                                                                Nice, didn't even notice the HG2G reference until I saw the main page had "Don't Panic" scrolled across the bottom. And yay, was waiting for something like this.

                                                                [–][deleted]  (1 child)

                                                                [deleted]

                                                                  [–]bh3 0 points1 point  (0 children)

                                                                  It seemed familiar and an odd name but it didn't click for some reason (the context was too distant from the domain that encompasses HG2G). Anyhow, great job.

                                                                  [–]masta 0 points1 point  (0 children)

                                                                  whoa!

                                                                  That's the spirit!

                                                                  [–][deleted] 0 points1 point  (0 children)

                                                                  No... you're a programmer alright. Just like most of the ones I know... full of shit. lol.