Hacker News new | past | comments | ask | show | jobs | submit | rduchnik's comments login

Seems the database has vanished too


Clicking back after visiting a link clears the search. Should keep it as a query parameter.


Good one! Added it to my TODO's. In the future I'm also planning to make the link visiting a bit easier


Yes, because you are not hitting a valid route, hence not found.

https://api-demo.websanova.com/api/v1/users


For the clearfix can't you just use `clear:right` or `clear:both`? Also for inline-block you can also use the ie7 hack `display: inline-block;*display: inline;zoom: 1;`. Nice tutorial though.


This comment is tangential on purpose, but if anyone is curious as to _why_ we use the `display: inline-block; *display: inline; zoom: 1` "hack" to support IE7, then I will gladly explain it to you.

First, CSS is cascading, meaning a rule following another rule will override it. Second, attributes with an asterisk prepended to the property name are only picked up by IE7. Finally, in a nutshell, IE7 treats layout differently than other browsers. On IE7, certain elements get layout by default, but other elements can be "given" layout by using certain properties (that we refer to as "hacks") like `zoom: 1`. When an element has layout in IE7, it can be given a display of inline and act like inline-block. This is one of the many reasons why older versions of IE were such headaches for web designers. More info about IE7's hasLayout quirk can be found here[1].

If we apply what is described above into these rules, we get this:

1. display: inline-block is applied to the element.

2. on IE7, display: inline is added to the element.

3. on IE7, zoom: 1 gives the element layout, thus making it act like it act like an inline-block. Other browsers attempt to "zoom" the element, but since it's at "1", this is like saying "zoom the element 1x the size," so it does nothing.

I hope that helps clear up why we use this hack.

[1]: http://reference.sitepoint.com/css/haslayout


> For the clearfix can't you just use `clear:right` or `clear:both`?

Not if you use it on the container itself, since it would apply to the interaction with floated elements that come before the one you use clear on - but here you open the container tag first, and then come the floats.

You could use clear on an element that comes after the floated elements, but before the container is closed, though. (you can also use the ::after pseudo element for this, maybe even in combination with ::last-child or something)


There is a comment on my blog from a developer from MLB.com for anyone who is interested:

"Hi -

Engineer from mlb.com here. It appears this goes a bit deeper down the rabbit hole than meets the eye. Apparently there’s some code laying around in our tests run by a CI setup that randomly generates a tracking code to mock third party scripts (Google analytics, ad tracking, etc) instead of using our actual IDs as to not mess with our marketing guys’ numbers (we run a LOT of tests on CI).

The strange thing is that your IDs aren’t being pulled from your site, but have randomly been generated the same way many, many times and then been shipped out to our production server by mistake.

We can’t figure out why this is happening, but are looking into the build system and how it caches data. Luckily I read HN or we might have never caught this!"


cough bullshit cough, The statically probability that you would generate an actual AND proper tracking code that also just happens to be used by a site that shares all you code is less than can be described. Your team got caught outsourcing jobs to code copy/paste firms.


"Wow, what a coincidence... we just happened to randomly generate a google analytics ID that was the exact same as the one used on a scratchpad plugin that we copied the code from..."


If only calculating the odds of this were as fun as 2048 we'd have a bunch of different solutions on the frontpage of HN for the next 2 weeks!


And wouldn't it make more sense to create a test GA account and just use the ID from there for everything, instead of generating randomly each time?


I don't see any reason for the guy to lie. He could just have not responded, or quietly changed the code, but he came to the blog and posted a publicly viewable comment about it ... maybe his diagnosis is wrong and something different is happening, but I'm very willing to believe it was an honest mistake given the circumstances.


I don't think he's lying, but I do think he's mistaken. They probably do generate random codes, but this was not one of them. It looks/smells like a copy/paste.

That aside, though, why not just create a different Google Analytics account and use that one consistently for testing?


This is exactly the reason they responded. By changing the code quietly, they would implicate themselves. An official PR statement like this is obligatory.

What is more probable, that they a lying, or that the random generator generated not a single code that matched, which is very(!) improbable by itself, but two codes that belong to the same account, generated at the same iteration.


This is not an official PR statement, it's an engineer responding at 11 PM (MLB is based on the east coast) with the information he/she had available. I don't think there's an intent to decieve here, just a mistaken guess of the probabilities involved. Hanlon's razor applies.


He has no idea that his team is a bunch of lazy outsourcers. He knows, he is just confused.


Yeah, it could be their CI doesn't generate random codes voor javascript code or something...


The thing that most inclines me to believe it is that, by my reading of the article (which admittedly might be reading to much into it), only a subset of MLB pages are using the ID. Hard to imagine why that would be the case if someone was simply copying code wholesale from the "victim" site.


Everything about that is dumb. If you need to test without affecting your numbers just have an alternate ID for tests.


Hi MLB.com engineer, I thought I should remind you that you're dealing people who think, and perhaps programmers too. We see through it.


Well mystery solved. I did a bit of sleuthing and noticed they have a scratch card at the bottom of the page. I had written a scratchpad plugin so I did a quick search for "wScratchPad" and sure enough it's there. They copied my sample code from http://wscratchpad.websanova.com, div's css and all and, you can even see the same `id` and `class` names.

I guess they copied a little too much.


Parent comment should be at the top of this submission. The response from MLB about "our CI creating randomly generated GA codes" is kind of ridiculous, when the truth is someone there did an excessive cut and paste from someone else's JS.


> Kind of feel like a bit of a jackass now

Wait, why do /you/ feel like a jackass?


Because he included his google analytics code in the plugin that he made available to the world.


He did not. It was only placed on his demo site and the guys at MLB just copied that site's code instead of using the released plugin.


I guess you released a little too much, generally you want to remove your GA code and replace it with a placeholder like: '<insert GA code here>'...


He did not release the Analytics code as part of the plugin, it was only placed on his demo site. MLB.com copied code from the demo site instead of downloading the plugin itself.


It's the internet. Copy+paste für immer. Get over it.


Actually it's so you can track multiple domain with one code. I do this with subdomains so that I can see all my traffic as well as by individual subdomain.


Hello User #1122111, we see you are trying to track potatoes.example.com , would you like to show this?

Y/N


It probably doesn't come up all that often.


Great, which means most users will never see the message when someone adds their tracking code.


It doesn't happen that much, so "most users" is going to not be very many users.


Well actually it's two sets of codes I use which is custom script I put together to track two ids since I have a lot of subdomains. Not how Google gives it to you, which leads me to believe it was copy and pasted. Still not sure how that could happen though.


Well it's not THAT much of a spike, at least not so far. Although the number has increased significantly since the screen shot. Right now I'm just curious to see how long it will take them to notice.


This is why OP gets such bad raps! Screenshot the digits!


I will when the dust settles.


SEEKING WORK - Toronto and Bangkok / Remote

Full stack web developer:

Technologies of choice: Git/Hub, PHP, MySQL, Laravel, jQuery, Backbone, Bootstrap.

Can also work with: SVN, CodeIgniter, Photoshop, UX Design, Linux

    * http://duchnik.com
    * http://websanova.com
    * http://LinkedIn.com/in/robertduchnik
    * http://github.com/websanova

I'm big on efficiency and DRY methodology both in coding and in processes. I enjoy thinking about solutions on how to make a team work better as much as I enjoy thinking about how to create an elegant solution.

I have lots of experience designing simple interfaces for complicated websites. I also believe in launching code often and breaking a problem down into small parts that can be delivered in days rather than months. There really is no reason why there can't at least be some soft internal or private launch that can get users playing with something.

I would like to work with a company or someone that has interesting problems to solve. I'm at my best when I'm working with people that enjoy discussing and trying to figure out elegant solutions and are self motivated to produce great results.

For any questions or if you would like to chat you can contact me at rob@duchnik.com


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: