Random programming talk | I have no Structs on my List
http://www.catonmat.net/blog/unix-utilities-lsof/
Iâve never used this command before and it is indeed very useful.
Why I Hate Frameworks
Iâm currently in the planning stages of building a hosted Java web application (yes, it has to be Java, for a variety of reasons that I donât feel like going into right now). In the process, Iâm evaluating a bunch of J2EE portlet-enabled JSR-compliant MVC role-based CMS web service application container frameworks.
And after spending dozens of hours reading through feature lists and documentation, Iâm ready to gouge out my eyes.
Letâs pretend Iâve decided to build a spice rack.
Iâve done small woodworking projects before, and I think I have a pretty good idea of what I need: some wood and a few basic tools: a tape measure, a saw, a level, and a hammer.
If I were going to build a whole house, rather than just a spice rack, Iâd still need a tape measure, a saw, a level, and a hammer (among other things).
So I go to the hardware store to buy the tools, and I ask the sales clerk where I can find a hammer.
âA hammer?â he asks. âNobody really buys hammers anymore. Theyâre kind of old fashioned.â
Surprised at this development, I ask him why.
âWell, the problem with hammers is that there are so many different kinds. Sledge hammers, claw hammers, ball-peen hammers. What if you bought one kind of hammer and then realized that you needed a different kind of hammer later? Youâd have to buy a separate hammer for your next task. As it turns out, most people really want a single hammer that can handle all of the different kinds of hammering tasks you might encounter in your life.â
âHmmmmmm. Well, I suppose that sounds all right. Can you show me where to find a Universal Hammer.â
âNo, we donât sell those anymore. Theyâre pretty obsolete.â
âReally? I thought you just said that the Universal Hammer was the wave of the future.â
âAs it turns out, if you make only one kind of hammer, capable of performing all the same tasks as all those different kinds of hammers, then it isnât very good at any of them. Driving a nail with a sledgehammer isnât very effective. And, if you want to kill your ex-girlfriend, thereâs really no substitute for a ball-peen hammer.â
âThatâs true. So, if nobody buys Universal Hammers anymore, and if youâre no longer selling all those old-fashioned kinds of hammers, what kinds of hammers do you sell?â
âActually, we donât sell hammers at all.â
âSoâŚâ
âAccording to our research, what people really needed wasnât a Universal Hammer after all. Itâs always better to have the right kind of hammer for the job. So, we started selling hammer factories, capable of producing whatever kind of hammers you might be interested in using. All you need to do is staff the hammer factory with workers, activate the machinery, buy the raw materials, pay the utility bills, and PRESTOâŚyouâll have exactly the kind of hammer you need in no time flat.â
âBut I donât really want to buy a hammer factoryâŚâ
âThatâs good. Because we donât sell them anymore.â
âBut I thought you just saidâŚâ
âWe discovered that most people donât actually need an entire hammer factory. Some people, for example, will never need a ball-peen hammer. (Maybe theyâve never had ex-girlfriends. Or maybe they killed them with icepicks instead.) So thereâs no point in someone buying a hammer factory that can produce every kind of hammer under the sun.â
âYeah, that makes a lot of sense.â
âSo, instead, we started selling schematic diagrams for hammer factories, enabling our clients to build their own hammer factories, custom engineered to manufacture only the kinds of hammers that they would actually need.â
âLet me guess. You donât sell those anymore.â
âNope. Sure donât. As it turns out, people donât want to build an entire factory just to manufacture a couple of hammers. Leave the factory-building up to the factory-building experts, thatâs what I always say!!â
âAnd I would agree with you there.â
âYup. So we stopped selling those schematics and started selling hammer-factory-building factories. Each hammer factory factory is built for you by the top experts in the hammer factory factory business, so you donât need to worry about all the details that go into building a factory. Yet you still get all the benefits of having your own customized hammer factory, churning out your own customized hammers, according to your own specific hammer designs.â
âWell, that doesnât reallyâŚâ
âI know what youâre going to say!! âŚand we donât sell those anymore either. For some reason, not many people were buying the hammer factory factories, so we came up with a new solution to address the problem.â
âUh huh.â
âWhen we stepped back and looked at the global tool infrastructure, we determined that people were frustrated with having to manage and operate a hammer factory factory, as well as the hammer factory that it produced. That kind of overhead can get pretty cumbersome when you deal with the likely scenario of also operating a tape measure factory factory, a saw factory factory, and a level factory factory, not to mention a lumber manufacturing conglomerate holding company. When we really looked at the situation, we determined that thatâs just too complex for someone who really just wants to build a spice rack.â
âYeah, no kidding.â
âSo this week, weâre introducing a general-purpose tool-building factory factory factory, so that all of your different tool factory factories can be produced by a single, unified factory. The factory factory factory will produce only the tool factory factories that you actually need, and each of those factory factories will produce a single factory based on your custom tool specifications. The final set of tools that emerge from this process will be the ideal tools for your particular project. Youâll have exactly the hammer you need, and exactly the right tape measure for your task, all at the press of a button (though you may also have to deploy a few configuration files to make it all work according to your expectations).â
âSo you donât have any hammers? None at all?â
âNo. If you really want a high-quality, industrially engineered spice rack, you desperately need something more advanced than a simple hammer from a rinky-dink hardware store.â
âAnd this is the way everyone is doing it now? Everyone is using a general-purpose tool-building factory factory factory now, whenever they need a hammer?â
âYes.â
âWellâŚAll right. I guess thatâs what Iâll have to do. If this is the way things are done now, I guess Iâd better learn how to do it.â
âGood for you!!â
âThis thing comes with documentation, right?â
Itâs like fart jokes for kids, but for non-JS programmers. Guess I was hoping for something more creative than a Seinfeld style joke pointing out obvious stupid/odd things spread out over more words than necessary.
Iâm biased so lulz.
I have very little time right now but still trying to do a little python every night, but also wondering how good it is to learn this by myself and then learn other things in school afterwards
Python so far very cool tbh
You can never learn too much of a language. The worst case scenario is that your course assignments turn out to be quick and easy.
What are you doing in Python?
Just a calculator that can parse stuff like â12+6â and â7/9â. Next I want to do a dialog text manager and that will come with objects and stuff.