http://www.gamedev.net/blog/355/entry-2250790-there-are-many-kinds-of-ugly/
(This is the bakery reference in the above linked article http://www.joelonsoftware.com/articles/Wrong.html )
This article makes a valid point about "the eye of the beholder" issue with code uglyness. I would make two extension points.
The first is that ugly code may also be a result of code reflecting an ugly problem domain (code in a swamp). The second would be that it may reflect the limitations of the tools or the staff using the tools (Blunt instruments).
Coding in a Swamp
Very few problem domains are neat. Its fairly easy to build an elegant solution in an elegant environment ( such as within the Unix context) however, once you get out into user land with the safety off and profit motives on... mostly people only have half a clue about what they are trying to do, how they want it done, what the consequences of doing it might be and how much they think it will be worth if they have to do it again. Now multiply the number of users by whatever factor you like and the complexity of the problem domain scales exponentially in so many dimensions it makes your eyes bulge just trying to bound the problem space. I pity the poor fool who imagines that they can find one neat architecture that will elegantly describe this order of complexity.
My point being, ugly code in this context is really a reflection of the programmer(s) evolving understanding of the context... its unpredictable, uncertain and often moves in weird cycles and feedback loops involving users learning the tools, which allow them to gain a better understanding of their own environment, which leads them to criticize the tools as being inadequate to describe their requirements... this feeds back to the programmer in "user speak" who then needs to re-imaging a solution in light of their often contradictory, partial or just plain weird information. The worst part being that the "user speak" is inevitably phrased in terms of "variations" on the semantics of the tool that exists in front of them at the time they made that comment... along with their memory of any variations of the tool that have gone before. This leads the programmer to see the users request as a variation on what already exists rather than a new framing of the original problem. Thus we get patches and tweaks on the semantics of what already exists which wanders further and further from the original anchor point of a clean design.
This process never ends. There is no point at which you get to stop and re-start the project... production code does not die... but some things "harden". Some ideas crystalise and everyone stops finding tweaks and fiddles that they want. This is the opportunity to factor that "Idea/semantic/feature" out of the mud and clean it up. While around it the rest of the primordial soup continues to evolve in ugly fits and starts with lots of culling of the weak designs.
Blunt Instruments
The other cause of ugly code is code produced by an ugly process. This can be poor tools, poor processes, poor staff, poor managment, lack of resources etc etc etc. In summary, code that does not have a low cost to change. This means code that is expensive for whatever reason, to make better.
Unfortunately, we exist in an environment that is for all intents and purposes... ugly. It has rough edges, obstacles and failures. We exist in an imperfect world and thus our code reflects this context. Either accept or face frustration and insanity. You can argue as much as you wish, make excuses, spend the future or take to drink... whatever helps you cope.
Evolution is at work on you... and chances are you are not going to win....
Monday, November 7, 2011
Editors + Content Creators = Quality?
http://sparksheet.com/return-of-the-editor-why-human-filters-are-the-future-of-the-web/
This article is interesting and makes a good point. The same point that is being made in academic circles, that peer review and editorial selection is the only way to separate the wheat from the chaff. Without peer review and examination by the community, it becomes increasingly difficult to stay relevant and in touch, let along maintain "accepted" standards of presentation and language.
The contrary argument that always gets trotted out is that this prevents "new" or radical ideas as they tend to be suppressed (overtly or covertly) by "established" ideas. While I think this is a danger, its true in any system that contains "vested interests" or "assumptions". Revolutionary change (great strides) is difficult for any system that is geared toward evolutionary (many small steps) change. This is more a factor of the mechanism of the system than the desire or intent of any one person within the system.
So what about algorithmic quality filters? Do they allow or reject revolutionary content? My guess would be ... it depends! An algorithm is a reflection of the programer(s) who created it. This usually means that it carries all their assumptions and flaws. More simply put, is the algorithm essentially a black list or white list model. Algorithms that are smart enough to do semantic analysis are just not yet feasible on the large scale, but hopefully they will be making an entrance soon and go some way to solving this type of problem.
This article is interesting and makes a good point. The same point that is being made in academic circles, that peer review and editorial selection is the only way to separate the wheat from the chaff. Without peer review and examination by the community, it becomes increasingly difficult to stay relevant and in touch, let along maintain "accepted" standards of presentation and language.
The contrary argument that always gets trotted out is that this prevents "new" or radical ideas as they tend to be suppressed (overtly or covertly) by "established" ideas. While I think this is a danger, its true in any system that contains "vested interests" or "assumptions". Revolutionary change (great strides) is difficult for any system that is geared toward evolutionary (many small steps) change. This is more a factor of the mechanism of the system than the desire or intent of any one person within the system.
So what about algorithmic quality filters? Do they allow or reject revolutionary content? My guess would be ... it depends! An algorithm is a reflection of the programer(s) who created it. This usually means that it carries all their assumptions and flaws. More simply put, is the algorithm essentially a black list or white list model. Algorithms that are smart enough to do semantic analysis are just not yet feasible on the large scale, but hopefully they will be making an entrance soon and go some way to solving this type of problem.
Labels:
algorithms,
Ethics,
Publishing,
Strategies,
writing
Saturday, November 5, 2011
DGTEC DG-HDMP1080 and my wasted night
I had a need for a media player, DTV solution and thought I would give the DG-HDMP1080 from Hills a try. What a waste of time.
Firstly, it killed my DVD-VHS player by over driving the video input. I can forgive that as it the player was a few years old and it could have been anything. Even so, the DG's hands were around its throat when it died so I am still pointing the finger.
Secondly, after putting it to a TV, I got the video feed to work fine. Then the setup was not what the manual said but easy enough for someone used to this kind of stuff. Find the channel scan option in the menus and start the Autoscan. Sit wait.... find all the channels... got 85% of the way through the spectrum scan and hung. And hung.... wait a bit. Go watch something else... come back...still hung. OK. Shit happens. Start it again... power cycle the system and it boots up again. Start the autoscan again.... exact same situation... slow scan... finds all the channels and then hangs before completion.
I did this about 5 times over the course of a couple of hours. Hung at the same spot in the spectrum, does not save any of the results that it has found.... first thought, buggy feature. Second thought... updates.
Check their website... there is a new image file... sounds good. Start the download.... its a weird kind of hidden streaming download... but I don't care as long as it works. Download stops at 15meg's... ok.. WinRAR opens it and reports its a truncated download.. should be about 40megs. Ok, start download again... this time it dropped out at 13meg, next time, 15.2meg, next time 11meg.... none of these are resumable due to the way they are streaming the file. I have downloaded more then the total size of the download and I still have no useful data.
The device has the ability to do an online update, so I try to hook it up to the wireless network in the house... but it cannot detect the network(its a hidden network with security), the device has not way to enter a WEP key... so it can only attach to unsecured networks... but it cannot even see any of the neighbours networks which are secured but still visible. OK, so the wireless feature is a dud too.
I plug it through a wired port and get the wired nework up and running, easy. Auto setup works, DHCP works, leases and IP fine. Happy days. I test connectivity by running the crappy little YouTube app. It works ... kinda.. enought confirm that there is network connectivity.
Try to run the online updater... mixed results... either claims there is no network or silently times out... no error message... just disapears. Another dud feature. Strangely about the same amount of time as it takes me trying to manually download the image from their website... could there be a connection? Anyway... another dud feature.
I try to supplied apps. They are totally shit. First screen full of youtube videos that it pulls down are half porn... quickly hide that and explain to the children something about mummies and daddies.... not very happy at this point.
Stuff the rest of the apps.
Ok, its a media player too... so in an effort to save some of the night, I plug in a usb stick with some family photos on it to test the functionality.... detects, seems to index... seems to find some directories... cannot bring up any of the photos... WTF? Simple Jpegs... seems to map the drive in a weird way, keeps calling it c: with some directories that I don't recognise. No clear idea where or what its trying to map. The file browser functionality is also... shit.
Lets try the network browse.... turn on the samba feature. The network sort of appears, it finds a workgroup that looks sane... but cannot see any shares in it. Again has no capacity to deal with any of the network level security so its probably as basic as the rest of the system.... in otherwords... pathetically under developed.
Just for bordem I had a look to see if it had any sort of online functionality. Had a look at the IP in the browser and came up with something called NeighbourWeb. (By the way the username and password are "admin" <- in lower case and pwd is "123". Took me ages to crack that.... It's nowhere in the manual because.... its yet another useless feature. Once you get into this system, it turns out to be a simple torrent client... which would be nice except this box has not built in storage. It turns out it uses the same firmware as its big sibling with an internal hard drive. Makes sense, but still leaves me running a box with a clearly insecure network interface that is not doing anything useful. Does this sound like something I want on my network?
OK, so the device is essentially useless for the purpose I purchased it for. It has failed to do virtually everything advertised on the box... which is a real shame as with some competent programming, its has all the interfaces that I was looking for and would have been simple enough for the children to use.
So just to round up this experience... my review is 0/10. The firmware in this product is not anywhere near ready for the public. Its entering a market with fairly mature products and is clearly a rubbish attempt with poor support, obviously broken functionality, being sold by a retailer who is almost irrelevant in the market place. Now I have to spend more time taking this brick back and getting my refund. There really is no silver lining and I cannot recomend strongly enough that everyone avoid this product and Dick Smith which is still trying to sell bottom of the pile rebranded rubbish.
Back to DTV cards for me.
Firstly, it killed my DVD-VHS player by over driving the video input. I can forgive that as it the player was a few years old and it could have been anything. Even so, the DG's hands were around its throat when it died so I am still pointing the finger.
Secondly, after putting it to a TV, I got the video feed to work fine. Then the setup was not what the manual said but easy enough for someone used to this kind of stuff. Find the channel scan option in the menus and start the Autoscan. Sit wait.... find all the channels... got 85% of the way through the spectrum scan and hung. And hung.... wait a bit. Go watch something else... come back...still hung. OK. Shit happens. Start it again... power cycle the system and it boots up again. Start the autoscan again.... exact same situation... slow scan... finds all the channels and then hangs before completion.
I did this about 5 times over the course of a couple of hours. Hung at the same spot in the spectrum, does not save any of the results that it has found.... first thought, buggy feature. Second thought... updates.
Check their website... there is a new image file... sounds good. Start the download.... its a weird kind of hidden streaming download... but I don't care as long as it works. Download stops at 15meg's... ok.. WinRAR opens it and reports its a truncated download.. should be about 40megs. Ok, start download again... this time it dropped out at 13meg, next time, 15.2meg, next time 11meg.... none of these are resumable due to the way they are streaming the file. I have downloaded more then the total size of the download and I still have no useful data.
The device has the ability to do an online update, so I try to hook it up to the wireless network in the house... but it cannot detect the network(its a hidden network with security), the device has not way to enter a WEP key... so it can only attach to unsecured networks... but it cannot even see any of the neighbours networks which are secured but still visible. OK, so the wireless feature is a dud too.
I plug it through a wired port and get the wired nework up and running, easy. Auto setup works, DHCP works, leases and IP fine. Happy days. I test connectivity by running the crappy little YouTube app. It works ... kinda.. enought confirm that there is network connectivity.
Try to run the online updater... mixed results... either claims there is no network or silently times out... no error message... just disapears. Another dud feature. Strangely about the same amount of time as it takes me trying to manually download the image from their website... could there be a connection? Anyway... another dud feature.
I try to supplied apps. They are totally shit. First screen full of youtube videos that it pulls down are half porn... quickly hide that and explain to the children something about mummies and daddies.... not very happy at this point.
Stuff the rest of the apps.
Ok, its a media player too... so in an effort to save some of the night, I plug in a usb stick with some family photos on it to test the functionality.... detects, seems to index... seems to find some directories... cannot bring up any of the photos... WTF? Simple Jpegs... seems to map the drive in a weird way, keeps calling it c: with some directories that I don't recognise. No clear idea where or what its trying to map. The file browser functionality is also... shit.
Lets try the network browse.... turn on the samba feature. The network sort of appears, it finds a workgroup that looks sane... but cannot see any shares in it. Again has no capacity to deal with any of the network level security so its probably as basic as the rest of the system.... in otherwords... pathetically under developed.
Just for bordem I had a look to see if it had any sort of online functionality. Had a look at the IP in the browser and came up with something called NeighbourWeb. (By the way the username and password are "admin" <- in lower case and pwd is "123". Took me ages to crack that.... It's nowhere in the manual because.... its yet another useless feature. Once you get into this system, it turns out to be a simple torrent client... which would be nice except this box has not built in storage. It turns out it uses the same firmware as its big sibling with an internal hard drive. Makes sense, but still leaves me running a box with a clearly insecure network interface that is not doing anything useful. Does this sound like something I want on my network?
OK, so the device is essentially useless for the purpose I purchased it for. It has failed to do virtually everything advertised on the box... which is a real shame as with some competent programming, its has all the interfaces that I was looking for and would have been simple enough for the children to use.
So just to round up this experience... my review is 0/10. The firmware in this product is not anywhere near ready for the public. Its entering a market with fairly mature products and is clearly a rubbish attempt with poor support, obviously broken functionality, being sold by a retailer who is almost irrelevant in the market place. Now I have to spend more time taking this brick back and getting my refund. There really is no silver lining and I cannot recomend strongly enough that everyone avoid this product and Dick Smith which is still trying to sell bottom of the pile rebranded rubbish.
Back to DTV cards for me.
Labels:
DG-HDMP1080,
DGTEC,
product review
Friday, November 4, 2011
Skills from Video Games
http://www.cracked.com/blog/5-real-skills-video-games-have-secretly-been-teaching-us/
This is articulate and funny.
This is articulate and funny.
Labels:
Game Design
You're a bad programmer...
http://badprogrammer.infogami.com/
There is much wisdom and a little sarcasm in this article. Must read for people making the transition from amateur to journeyman programmers.
There is much wisdom and a little sarcasm in this article. Must read for people making the transition from amateur to journeyman programmers.
Labels:
Philosophy,
Programming,
Software Design
Thursday, November 3, 2011
PETMAN chassi
http://articles.boston.com/2011-10-31/business/30342672_1_marc-raibert-robotic-aircraft-bigdog
This is a fun looking bit of gear. Still looks a bit rigid and I notice there is no head assembly so the balance system will need to be set up for that. Seems a little strange to build all that without a head.
Am I just being petty focusing on the rigid body issue? Seriously this is some nice work.
http://inhabitat.com/petman-the-anthropomorphic-robot-designed-to-test-chemical-protection-clothing/
This is a fun looking bit of gear. Still looks a bit rigid and I notice there is no head assembly so the balance system will need to be set up for that. Seems a little strange to build all that without a head.
Am I just being petty focusing on the rigid body issue? Seriously this is some nice work.
http://inhabitat.com/petman-the-anthropomorphic-robot-designed-to-test-chemical-protection-clothing/
Labels:
Robotics
Monday, October 24, 2011
Compiler as API
http://msdn.microsoft.com/en-us/hh500769
Rosylyn project.... Sort into "Things I have wanted to waste time, which I don't have, on..." category. Now if only they would do it for the VC++ compiler.
Rosylyn project...
Labels:
Programming Languages,
Programming Tools
Subscribe to:
Posts (Atom)