|
removed
modified 15-Oct-11 13:46pm.
|
|
|
|
|
CSD_boles wrote: How crappy am i?
Pretty bad, if you think that is worth publishing as an article. Have you bothered to look at any others? I have my doubts that that would pass muster as a Tip / Trick to be honest.
And as for trying to advertise it, frankly I'd rather keep it quiet if I was you...
Not good for your first posts here.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
OriginalGriff wrote: Not good for your first posts here.
Oh they've been worse, a whole lot worse.
|
|
|
|
|
Oh yes - see the "message automatically removed" just above.
But for someone who has obviously looked at the site before he signed up, that is a very poor attempt at an article!
But then, that's why I haven't down voted him at all - just commented.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
I think the expression Code Drop describes this pretty well.
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
CSD_boles wrote: How crappy am i?
Having looked at your article and attached code I am reluctant to answer this truthfully as it would contradict one of the guiding principles of The CodeProject.
|
|
|
|
|
Excerpt:[^]
"In a tiny South African cave, archaeologists have unearthed a 100,000-year-old art studio that contains tools for mixing powder from red and yellow rocks with animal fat and marrow to make vibrant paints as well as abalone shells full of dried-out red pigment, the oldest paint containers ever found."
First Palaeo-Man, the Artist: "Now right here, in the center, we're going to have She-With-Big-Breasts-And-Butt ... and then over here some deer ..."
Second Palaeo-Man, the 'patron:' "Are you nuts ? You been eating the mushrooms again ?: What do you think I'm paying you two tusks for here ... Bison ... I said I want Bison Magic ... draw Bison ... Bison come ... kill Bison ... much meat."
The Artist: "But every body does Bison !"
The Patron: "You want tusks ... you do Bison. You no do Bison I rock your head."
The Artist: "Yes, Boss."
I guess that the Altamira cave (circa 12-15k years ago), where a row of ready-to-use sharpened 'crayons,' arranged in a 'spectrum' were found neatly laid out[1] has been made modern by this new find.
Scholars like Kuhn, whose work was based on the Lascaux cave paintings, believe that the pigments used were close in structure to modern oil pigments, and that the nature of the design process involved squirting colored powder out of bone tubes into the prepared surface of oil and fat. A surface Kuhn believes was prepared by first outlining with a delicate brush, perhaps the equivalent of a snipe's plume, then incision by some other tools on the outline.
The evidence at Altamira, and this South African find, support questioning the hypothesis by some palaeo-scholars that the use of ochre was not in painting or decoration, but was used, mixed with plant resins, as a glue to join spearheads to hafts.
[1] material in these two paragraphs from an essay by Evan S. Connell in 'Aztec Treasure House,' which I read recently.
"Last year I went fishing with Salvador Dali. He was using a dotted
line. He caught every other fish." Steven Wright
|
|
|
|
|
i've recently been to altamira and seen the (now replicated) cave and paintings and i must say even the fake ones are impressive as hell ... well worth the visit if you can
"mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"
|
|
|
|
|
Twice now, after spending hours editing a Word document opened from the My Documents folder, I've been told that the document is Read-only, and that I can't save my revisions. What the hell is going on? Are we back, in Win7, to the original XP problem of losing network connections every few minutes? That was solved a decade ago; why is it resurfacing now?
Will Rogers never met me.
|
|
|
|
|
with Fridays, at least. Today was my last Friday working for the year, and a hellish day it was.
It started before work with a phone call from a truck driver. He's on his way to our substation with a new transformer to replace the one that smoked in July while we were barbecuing a small bird across all three phases of a 25kV substation bus. It was overcooked, so I can't tell you how it tasted.
The driver wanted to know if we intend to have him take the dead transformer back to Kansas to a buyer we had lined up to scrap the thing. Reasonable question... I spent a few hours arranging the sale of the scrap to the company in Kansas by telephone and email, then called the driver back to let him know that he's got a load for the trip back. They hate having to dead head a trip, as it costs money they can't recoup.
Then I got an email from the buyer - "the test results you sent for PCB content in the oil are inconclusive; can you overnight an oil sample to our lab today for re-testing?" I went ballistic. No one has ever asked for such an absurd thing in the past, and it's not something that we do as a regular practice. We don't even have a test kit in house, as none of our equipment has any measurable PCB content. I sent an email expressing my thoughts about the silly question, and promptly received an apologetic phone call from the buyer. He explained that he was just trying to accommodate his "anal-retentive environmental idiots" by sending the request, and that I shouldn't let the email interfere with shipping. So far, so good. I'm relieved...
At lunchtime I got another call from the buyer - "the price the truck driver wants is too high. We can save money if we wait a few weeks to send an in-house truck and hire a local crane to do the loading." I then called the trucker and asked for a lower price, which he gave me - a good 25% reduction. But that wasn't enough for the buyer; they're convinced that the job can be done for much less. I gave the buyer a list of crane operators in the area so that they could call for pricing. A few hours passed with no word from them, so I called again.
They were all at the bar celebrating 40 years in business with a keg party, so it was noisy when I talked to the rep, but he still hadn't got a price from anyone, and it's near closing time at my place. Taking one last shot at talking sense into this kid, I explained that the nearest crane capable of handling this transformer is 150 miles away, and that it takes 8 hours just for it to drive here, the cost of just the crane service will be more than the trucker was asking to carry it.
At that point, the buyer's rep said something that's not kid sister safe, and told me to have the thing loaded and shipped Monday morning on the truck delivering the new unit.
Between phone calls and emails, I was trying to verify parts specified by a consulting engineering firm we hired to design a 69kV transmission line that stretches from the reservation to Davis Dam, about 9 miles distant. With all the recent business failures and corporate buyouts that have been going on, I found that most of the parts specified were from companies that no longer exist. So I spent my spare time trying to locate equivalent part numbers from alternate suppliers all day...
I'm tired, but I can't stop yet - I still have homework to do, an exam to write before tomorrow night. Sheesh! If you need me, don't call - find a way to cope. I'm busy writing bullshit to make an academic happy, for a class that has absolutely no value to me, but is required. Have a nice weekend; somebody should...
Will Rogers never met me.
|
|
|
|
|
Roger Wright wrote: I still have homework to do ... I'm busy writing bullsh*t to make an academic happy
So you want to be a student again?
I ran into the same problem when I went back to graduate school after having 10 years professional experience in the industry.
The professors really don't like to feel threatened by someone who may actually know more about the subject matter then they do. In most cases they have never been out of academia (read never had a real job in the industry) and much prefer doting students not professional equals or above.
I had a professor for a class in Operating Systems and System Architecture who gave a lab assignment every week for some type of logic circuit that was covered in class. If he laid out the circuit in AND gates I would construct one using anything but AND gates to show that I really did understand and was not just regurgitating exactly what he was demonstrating.
He caught on to that and soon the lab assistant started marking my design wrong. No amount of reasoning would make him see that these were perfectly functioning circuits because they didn't conform to the two examples provided by the professor as correct solutions to the problem presented.
I brought my workbook to the professor and explained to him that these circuits were perfectly functioning, albeit unusual, solutions to the problem presented. He looked at me and smiled,hesitating for a second and said my lab assistant grades the lab work.
I continued to solve the lab assignments and the lab assistant continued to say they were wrong based on the acceptable solutions provided by the professor.
It was the professors way of giving me a B for a course where I rightly deserved an A.
I was happier receiving a B and not selling out to some wanker who has a superiority complex, and he was perfectly content to be the a$$hole he is.
I hope your experience is different than mine.
|
|
|
|
|
I had an experience like that in college. The professor in my microprocessor design course was an ass, for reasons that would take too long to explain. The course was based around two exams and one large final project. The exams and all of the code in the class were based on 8085 assembly language, which I had been writing at work for a couple of years at that point.
I'll always remember the final exam. It was a list of about 60 random 8085 instructions. He told you to take those instructions, and only those instructions, and construct a routine that accepted arguments in certain registers and produced a specified output. You had to use all of the instructions provided, and each of the instructions only once. I remember it took me a while, because I kept ending up with instructions left over.
I didn't quite finish my final project, but I had more than enough to demonstrate what I had planned. When he saw that, he told me he was giving me an F in the course, even though he had already passed a number of people who had finished even less than I did. Something made him relent, and he decided to review my exam scores. I had a perfect score on both tests.
I got a C in the class.
Software Zen: delete this;
|
|
|
|
|
Gary R. Wheeler wrote: I had a perfect score on both tests.
I got a C in the class.
Unfortunately, higher education is nothing more than a beauty pageant in disguise.
People with real talent don't do as well as the beautiful people1.
1. doting students who look up to and don't challenge the professor with real intellectual arguments.
|
|
|
|
|
Thanks for a good read. Hope it helped you to type it up. Good luck with your paper.
It’s not because things are difficult that we do not dare, it’s because we do not dare that things are difficult. ~Seneca
|
|
|
|
|
Roger Wright wrote: I'm busy writing bullsh*t to make an academic happy, for a class that has
absolutely no value to me, but is required.
Unfortunately Roger that's a fact of life in upper education. I hope it's balanced by the occasional class that's really great. My undergraduate career was about 70% BS courses, and 30% B.S. courses, if you get my meaning. The 30% balanced things nicely, because I'm still using that stuff today.
Software Zen: delete this;
|
|
|
|
|
I was just searching for a way to collapse LI tags in the Visual Studio editor without having to manually right click it and select "collapse tag" when I got distracted and read Coding Horror: The Problem with Code Folding. I am a big fan of code folding, and here are some points Jeff makes that I disagree with:
- "I can't see anything!" Actually, you can. You can see the first line of whatever is being folded. In the case of regions, you can see the name of the region. When I am doing web development, I tend to wrap code into regions like "Event Handlers" and "Private Methods". If I want to get a feel for how the program flows, I go straight to "Event Handlers" and look for something that looks like the page load event handler (or init, or what have you). Or if there are constructors, I'll look there first. If I just want to see what properties are available in a user control, I'll go to "Properties" (and since the properties are folded, I can ignore their implementation). I find hiding stuff I don't need to see speeds this process up.
- "Folding directives are glorified comments. Why, exactly, are we writing code to accomodate the editor?" Comments are good. Regions are like comments with a bonus feature (folding a region of code that doesn't otherwise get folded). That's not a bad thing. And we're not accomodating the editor... we're accomodating ourselves and other developers who will come in later to see nicely organized code.
- "Folding is used to sweep code under the rung. Folding is used to mask excessive length." No doubt, when it's used wrong. Just don't use it wrong. Simples. Still, there is some value in hiding information that you don't need (it distracts you less and frees your mind to think of what you are trying to focus on).
- "Folding can hide deficiencies in your editor." From another perspective, it replaces a feature seen in other editors. Sometimes I may want to put all my methods into a "Methods" region. Or maybe I'll put them into "Public Methods" and "Private Methods" regions. Or maybe I'll put event handler methods into "Event Handlers". And so on. Relying on an editor to group these sections automatically may be less flexible and so less useful than if a developer were to choose the regions himself or herself. Perhaps a conversion class is organized into regions according to what data type a method operates on and maybe a user control class is organized into regions according to method types (event handlers, constructors, utility methods, public properties, and so on). Just because some other editor does something else does not mean this editor choosing a different route is a deficiency.
Jeff seemed to focus on code folding with respect to regions, so maybe his post should have been called "The Problem with Regions". For example, he ignored how useful it is to have ASP.Net markup and HTML to be code folded. His post was made in 2008, so I'll cut him some slack for that. Still, I'm a fan of code folding and I found his post unpersuasive.
What's your take on code folding, especially with respect to regions?
Somebody in an online forum wrote: INTJs never really joke. They make a point. The joke is just a gift wrapper.
|
|
|
|
|
For anybody reading the above curious how to collapse LI tags...
Tools > Options > Text Editor > HTML > Formatting > Tag Specific Options... > Client HTML Tags > li > Enable outlining for tag
Somebody in an online forum wrote: INTJs never really joke. They make a point. The joke is just a gift wrapper.
|
|
|
|
|
I like code-folding as an option ! I think judicious use of it often helps me switch from narrow-focus on some particular functionality back to 'big-picture' view.
I have wished for the ability to 'fold' ... just one level of folding would do ... in CP articles ... imho this would enable having a top-level highly readable article with lots of minute-details, digressions, footnotes, etc., hidden, but available.
best, Bill
"Use the word 'cybernetics,' Norbert, because nobody knows what it means. This will always put you at an advantage in arguments." Claude Shannon (Information Theory scientist): letter to Norbert Weiner of M.I.T., circa 1940
|
|
|
|
|
BillWoodruff wrote: I think judicious use of it often helps me switch from narrow-focus on some particular functionality back to 'big-picture' view
I agree with this. The same principle applies to comments, and those who think code is self-documenting don't seem to get that. Sure, you might be able to get what the code does relatively easily by reading it, by why not save some time and read a comment that explains it more succintly instead? And having them at different levels (group of code, method, region, class, project, application) gives you more choice of exactly at what level you want to understand the code.
BillWoodruff wrote: I have wished for the ability to 'fold' ... just one level of folding would do ... in CP articles
That's actually something on my TODO list... I want to find out if there is some way to do folding (of sorts) in the company wiki (useful for instruction documents that go into great detail but only need to be read at a higher detail for those who are more experienced).
Somebody in an online forum wrote: INTJs never really joke. They make a point. The joke is just a gift wrapper.
|
|
|
|
|
I use regions extensively. Right now I'm looking at a class with no less than 4000 lines. Scrolling up and down, possibly even with all methods and properties unsorted would drive me crazy in a very short time.
This class has endless lists of methods (public and private), properties and member variables. On top of this it defines a handsome list of events and also has many properties and methods which must be kept thread safe. And yes, it needs all this functionality because its name is 'Control' and is the base class for all controls in my XNA GUI. And who would I try to hide excessive code from anyway? Myself?
And from the clouds a mighty voice spoke: "Smile and be happy, for it could come worse!"
And I smiled and was happy And it came worse.
|
|
|
|
|
I'm not a big fan of it, but I can pretty much just ignore it. I do use regions in some cases and collapse them, but otherwise I don't collapse anything.
|
|
|
|
|
Let me guess: You write mostly 'Ravioli code' like web applications where you can pack most things into small overlookable classes and methods. I feel more at home with complex logic like parsers or rendering and graphics. You can't keep things as neat there.
And from the clouds a mighty voice spoke: "Smile and be happy, for it could come worse!"
And I smiled and was happy And it came worse.
|
|
|
|
|
Primarily backend / database, but yeah, maybe ravioli kinda describes it.
You're welcome to read my articles... 
|
|
|
|
|
I liked that term when I first heard it as opposite to Spaghetti code.
And there also was Lasagna as description for strictly layered code. Hmm, for application logic and data access you best use both Ravioli code which at the same time is Lasagna code. This is getting confusing and making me hungry
And from the clouds a mighty voice spoke: "Smile and be happy, for it could come worse!"
And I smiled and was happy And it came worse.
|
|
|
|
|
Ravioli with Rock Lobster sauce?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|