Better HN
topnewbestaskshowjobs
Log inSign up

randomdata

8,634 karma · joined Jun 23, 2011 (15y ago) · 7,679 submissions

Submissions

comment 14y ago · link · parent

I often find myself wishing for CSS widgets, so to speak. A reusable component of HTML and CSS that can be inserted without inheriting anything from the parent elements. You can achieve this if you take a lot of care, but it should be a lot easier than it is.

But where CSS really falls apart is in layouts. What is just a simple equation in a native application ends up being a myriad of hacks to get things flowing right in CSS. Javascript comes with the missing pieces, but introduces its own set of problems if you try to rely on it.

> the difficult of writing core graphics methods for every bevel, rounded corner, gradient etc has a lot of developers just using cut images for everything.

On iOS, the QuartzCore framework provides declarative methods for those common style choices (rounded corners, gradients, etc.).

comment 14y ago · link · parent

But that is why Rails promotes defaults. Only once you begin to see shortcomings with the defaults do you need to start looking for something else that may be a better fit.

comment 14y ago · link · parent

I subscribe to "get it done" programming. I've never had the troubles you seem to speak of going back to fix the shortcuts though. Interfaces are, for all intents and purposes, black boxes, so your improvements can always be dropped right in with relatively little effort.

I guess if the codebase is a mess of spaghetti, that is another matter. I do always try to get the interfaces right from the beginning.

comment 14y ago · link · parent

I understand where your coworkers are coming from. Getting the application up and running to prove the concepts the application intends to solve is critical in a business setting. If you can implement search by hitting every element in the array in a fraction of the time it would take to implement a binary search, you are that much further along to seeing the application in action.

If they actually refuse to go back and implement a better algorithm once the characteristics of the application are known, that is another matter. Do these people actually hold the same beliefs once they start to see the performance of their application rapidly degrade?

comment 14y ago · link · parent

Some still farm that way today. I know my great-grandfather was using tractors by the 40s, if not before. We still regularly used one of his old relics when I was a kid. The oldest tractor we still use today is from the 60s, purchased by my grandfather.

I don't really know much about the farm on that end before that though. I should do some asking around.

comment 14y ago · link · parent

I'm the seventh generation to work the land on my family farm. It is pretty amazing to think that so many of my ancestors before me did the very same, albeit with less modern technology. The original barn and first brick home (I'm told there was a rough wooden home that preceded the brick one when my family first settled on the land) still stand there today.

comment 14y ago · link · parent

I'm not sure that there is an advantage in having an older account under said system, it is more about freezing the ideologies of the rankings during the time at which you signed up. If you signed up during the time that the discussion was all about startups, then your feed should remain predominantly about startups. If you are a more recent subscriber, you will see more political and "learn how to program" type discussions as presumably those topics are what enticed you to sign up at that point in time.

Of course there is danger in that as well, but I see so many lament that they wish it was like it was in the "good old days", where good old days equals the approximate time in which they joined. The way to do that is to let them have the member base just as it was back then, while still letting the site naturally evolve for the rest.

comment 14y ago · link · parent

But cheating whom, exactly? It is not like the mark matters at the end of the day. What matters is if the material has been learned, and if it takes several iterations to finally learn it fully, so be it.

comment 14y ago · link · parent

What if users with a registration date around your own or prior had a more significant weight with respect to their votes? That should, at least in theory, keep the content fairly consistent with the quality you came to know around the time you registered.

comment 14y ago · link · parent

> Evidently that wasn't very clear.

Actually, I would say your intent there was quite clear, which is where I came to realize that the code did nothing. Without that context, one could assume the method was used for its return value where the code could very well have had purpose as written.

What wasn't clear was how the count attribute was intended to be used throughout the rest of application. In the real world I would start to build a mental model around the uses of count, which was not available from your example. In terms of self-documenting code, I liken a short code snippet like your example to a sentence fragment in english. The entire sentence, or statement if you will, encompasses much more of the codebase.

This is definitely an fascinating topic, but unfortunately one that is very difficult to discuss for many reasons. I wonder how we can dig into the physiology aspects that you raise without the prevalent "my way is the only true way" attitude?

comment 14y ago · link · parent

That's not really the point to the 10,000 hour rule though. It is about practice.

If it takes person A five weeks to learn the study and it takes person B 10,000 hours to learn the study, after the next 10,000 hours of working in the industry, can we consider both individuals masters? Or are you suggesting that mastery is somehow proportional to time to original training completion?

comment 14y ago · link · parent

The 10,000 hour thing is about mastery. Is someone who spent ten weeks learning about organic chemistry able to operate on the same level as someone who has been working in the field for decades? I suspect the answer is no.

Anyone can learn how to play golf in just a few minutes, but what does it take to become a PGA-level player? The theory is that it only takes 10,000 hours of focused practice and it is currently being put to the test: http://thedanplan.com/

comment 14y ago · link · parent

I'm now curious to know what you would have written for documentation.

Though, I think your example turned out to be a great one because it highlights that not everyone reads code the same way. Personally, I load large segments of code into memory and then mentally step through. You left me wanting more to see the context in which the method was to be executed, but I didn't really feel the need for comments.

However, with just the one method that you wrote in your example, that seems to indicate that you read just one function at a time. If you are not observing the code as whole, I guess a comment would help. I often find them taxing though, as they have to be read into memory as well.

I think that discrepancy is why the comments vs. self-documenting code debate exists.

comment 14y ago · link · parent

Your code doesn't actually seem to do anything, so a comment would either be contradictory to the code, which is confusing, or explain why your code does nothing, which is silly.

I would argue that in this case, it is far better to just understand the code and then fix it appropriately. A comment would leave you second guessing.

    def auto_increment
      self.count += 1
    end
(though, for the purposes of self documenting code, count probably is not a great variable name either)

comment 14y ago · link · parent

I can see driverless cars being designed for more household-like activities, as many will want to travel while they sleep, etc. Whether or not that prompts many to abandon their homes remains to be seen, but the changes could make it a more comfortable living space than a car of current design.

comment 14y ago · link · parent

Keep in mind that 70,000,000 high school graduates in the USA are employed, while only 35,000,000 college gradates are employed. High school educated people have a long way to go before they are completely marginalized by college graduates. You make it sound like there are just a handful of high school educated people hanging on to the last jobs by the skin of their teeth, which couldn't be further from the truth.

I feel it is also important to note that the college educated gains made in this study were by people aged 25 or above. Those below that age are actually more employed with just a high school education for the first time. We can surmise from that data that experience is what has become important in the recession, which is also backed by my anecdotal experience. It is just that a degree actually did matter a decade ago, which left those without a degree lacking in the necessary experience today.

comment 14y ago · link · parent

Another article I read recently said that the gains were made by people above the age of 25. This actually indicates that experience became the important factor of the recession, though the degree may have been important prior to the recession in order to build that experience.

comment 14y ago · link · parent

> high school educated people are increasingly useless to our economy.

That seems like a silly statement. The jobs that most college graduates are fighting for were once, and often still are, done quite successfully by high school educated people. It is not that education matters in the workplace, it is just that the demand for those jobs has kept people trying to increasingly outdo everyone else in order to get the job. Education has been an easy way to do that.

Education doubly serves as an easy filter. You have probably heard your parents say something like "in my day you only needed high school." That is because there were less high school graduates during that time. If you threw away the resumes without high school, you could pare them down to manageable levels. In the meantime there was a big push to see more high school educated people. Suddenly, filtering by high school yielded too many results. Degrees were still relatively rare, so applying that logic allowed the filter to work again. But then the big push for college education started...

53% of recent college graduates are underemployed or jobless[1]. This seems to indicate that having a bachelors is not even enough anymore. "Everyone" has a bachelors degree these days, so why hire one of them when you can hire someone who has a masters degree?

The economy would do just fine if we had more high school (or less) educated people, but we would have to find some other filter, like gender, race, or religion and we have already decided that no company may filter based on those attributes. That leaves the infinite arms race of education where it is still socially acceptable to consider those without said education "stupid" and unfit to do the job.

[1] http://blog.fora.tv/2012/04/the-new-53-unemployed-college-gr...

comment 14y ago · link · parent

About 50% of the working population have some kind of post-secondary education, including community college diplomas and apprenticeships. Roughly 50% of that group (or 25% of the total working population) have a college degree.

> The right metric is to look at percentage unemployment in each of these segments

I would take it even further and break up the high school or less demographic. Someone who could obtain a degree, but chose not to/was unable to attend college is not at all like someone who has no chance of graduating no matter what the circumstances. They really shouldn't be lumped together if we are trying to promote the business benefits of attending college.

If you have the opportunity to go to college, you have already demonstrated characteristics that are appealing to employers that are not present in the rest of the demographic. Due to the presentation, it is not clear in any way if college actually add any additional value or if those people would have achieved the same results regardless.

comment 14y ago · link · parent

Having the right attitude doesn't always lead to success, but having the wrong attitude always leads to failure. There is a positive correlation between those who are strong willed and determined and those who complete college, which most likely explains why college graduates tend to fare better in the workforce – graduates generally all share that same attitude, whereas non-graduates are a mixed bag.

comment 14y ago · link · parent

> The mentality is that if I just have enough education, the jobs will be waiting (law students anyone?)

Anyone who has this mentality is not following their dreams, they are following the crowd. Crowd-followers rarely do find success. That is what stood out to me in the article. The people who are being written about are not really doing what they want to do, they are doing what is expected of them (go to college and then get a good job).

I wonder if the results would be different if these people struck their own path?

comment 14y ago · link · parent

I somehow doubt the people in rural Africa struggle because they just aren't working hard enough or aren't committed enough to reaching the "American dream". Though I do agree that some people miss out on opportunities as a result of not taking advantage of those qualities.

comment 14y ago · link · parent

I'm inclined to agree, but it is the generally accepted attitude in the industry.

Programming is design, but programmers are routinely taught that they do not need to care about design. The de-facto training facility for the industry, a CS degree, rarely goes into artistic endeavours (naturally, but students rarely take it upon themselves to fill their skill gaps after graduation). In fact, it is the status quo for programmers to joke about how poor their design skills are.

Good programmers go over and above and study not only the theory behind programming, but also design. Until we start promoting that programmers must be good designers, the problem will continue.

comment 14y ago · link · parent

I do agree that there is merit to documenting public interfaces, but there are tools designed specifically for that job so that you do not have to go slogging through the source code at all when you want to look up a definition.

As a result, I feel that is a different matter to commenting for the purposes of code maintainability, which is what the parent poster is speaking to.

comment 14y ago · link · parent

People still ride horses and enjoy doing it, but I don't see anyone advocating using horses for their daily driver (the Amish excluded). Driving for pleasure doesn't have to go away.

comment 14y ago · link · parent

If someone writes poor code, what makes you think they will be able to write quality comments? The reality is that if you are poor at expression, you are generally going to be poor at it in all mediums.

comment 14y ago · link · parent

> yet stumble into educational gaps/traps any degreed developer would have learned to avoid.

Care to list some of the common ones you've seen? I'm mostly curious, but it would serve as a good reminder for those who may fall into those traps themselves.

comment 14y ago · link · parent

> that would otherwise require each reader of the code to understand the code itself in depth.

Is that a problem? Even in code that has good comments, I always skip the comments and go straight for the code. Comments are okay if the code needed to employ hacks for some good reason, but otherwise I've never met a function that I wish had them.

I often wonder if people come from different backgrounds, which leads to completely different points of view on the matter. Personally, I find code easier to read than natural languages, but that doesn't mean everyone is the same and I respect that you might find comments useful. But why then assume that everyone needs comments?

comment 14y ago · link · parent

I'm not sure I agree. I follow the agriculture channels and you see the same kind of thing when a big agriculture company acquires someone whose products you will never see again.

You just only read about tech-specific acquires here because that is the focus of HN.

1
235236237
256