|
In that case, Happy Birthday!! It's well and truly April 2 here!!
|
|
|
|
|
I don't know how to "inspire" you for the other three, but with writing, the thing to do is just sit at a word processor and write -- literally.
The main thing with writing is that people are held back by the fact that it's hard to write stuff that's worth reading, and the next thousand words is always the hardest to get moving on.
Just write any old garbage for a couple of hours, for any section of anything you should be working on; it doesn't matter if it's not good enough for final copy, or even if it's only good enough for the shredder.
It can be complete gibberish, and 80% irrelevant to what you're doing, as long as you get something on the page.
As soon as you've got that far, you've got something to work with, and something to improve.
It's a lot easier to find the energy to improve something than to start it, so just brain-fart words onto the page to give yourself a start.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Another hint for writing is to follow Douglas Adams' lead -- and rewrite something three or four times.
|
|
|
|
|
Er, yeah. That's what I said.
If you write perfection first time, you don't need to improve it, so write garbage, and improve it.
The desire to write perfection first time is often what prevents your being willing to write.
Me:
Start with garbage > improve > improve > etc.
Doug:
Write garbage > rewrite > rewrite > etc.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
That's really a great suggestion. Now I'm keeping sketchbook & notepad with me always for that reason.
And you're a comic artist, right? Couple of months ago I did download your comics from your site. It was good as I like to read zines, mini comics. I have a plan to start webcomic(not soon) but first I need to prepare many things & the first thing is make many strips for buffer time. And I'm not even completed writing for that.
|
|
|
|
|
I'm way too busy to draw, so I wouldn't call myself a comic artist, but if anything needs quality writing or a spark of creativity: that I can do.
It's just a shame that 80%+ of comics are lacking those things, creating a barrier that I don't like to cross. I used to love comics, when I was a kid.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Who's Glade, anyways? Is he always Glad?
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
I assume that he meant to say that he's glad to take some time off in a glade.
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
It could be worse. You could be coding in Limericks .
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
That's something I always wanted to do, many moons ago when I was working in COBOL, where you could actually set it up to have sections of code as poems, but I never had enough time free to apply myself to it.
Shame. It would be nice to know that somewhere in a bank there was a little bit of soul.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
I know just the place[^] you can visit to enjoy your time off!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I made a mental connection of Glade with Raid and thought it was a pun. (Bug reports) Maybe I need some time off as well!
"Go forth into the source" - Neal Morse
|
|
|
|
|
It gets worse. We're replying in verse.
|
|
|
|
|
I won't do that.
I'll sound like a prat.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Glade, in the UK, is a spray for masking nasty smells.
I don't think I want to know where you're going to be sitting for the next few few days, but my advice is drink plenty of lightly salted water, and eat lots of bananas.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Sorry to burst your bubble but that's not a Limerick.
|
|
|
|
|
* DISCLAIMER *
This isn't a programming question, because I've solved the programming problem myself.
Rather, I'm interested in your opinion regarding the solution, clever or 'clever'?
So today I had a nice little challenge.
My application has a grid which can be sorted on various columns, asc and desc.
Now the sorting isn't applied by clicking the column header, but by selecting a value from a drop down (Name, Name (descending), Title, Title (descending) etc.).
I was thinking I could just have a switch statement where I check which ordering the user chose (which would make me extend the switch for each new ordering), or... I could abstract this away.
Of course I went for the second option. Now to make this work (and it works nicely, adding a new ordering is a piece of cake) I had to write the following function:
SomeFunction(string caption, Func<IQueryable<TElement>, Expression<Func<TElement, TKey>>, IQueryable<TElement>> linqFunction, Expression<Func<TElement, TKey>> expression) { ... } Since this is a WinForms application though, and WinForms and generics don't go well together I'm more or less forced to use a dynamic later on as it's quite impossible to get the values of TElement and TKey from object .
I'm thinking this isn't ideal in terms of complexity and readability, but it is pretty neat because adding a new ordering is really simple (one line of simple code) and guaranteed to work on the first try (you'll never forget to change that switch statement again).
And the solution is even re-usable for the filter functionality I need as well (which, of course, becomes a breeze as well)!
So judging from that, clever or 'clever'?
And where do you draw the line for cleverness vs. readability/simplicity?
|
|
|
|
|
I can't read that code.
Do you actually sort the grid? Or sort the data that is then displayed by the grid? A standard DataGridView generally displays a DataView (based on a DataTable) and you control the sorting with the Sort property.
Does your solution allow multi-level sorting? E.g. first by X, then by Y ? I can't stand grids that allow sorting on only one column at a time .
I'm unclear on the details of what you have, but I would consider having each Item in the DropDown know what it is supposed to do -- perhaps a class with a Name and a Delegate -- so all you need do is add a new Item to the DropDown.
|
|
|
|
|
I'm sorting the data that is then displayed by the grid. The DataGridView works pretty well when you have a DataView, but all I'm having is a List<T> which I haven't been able to sort in the past if my life depended on it. So it's easier to just take your original list, sort it (using OrderBy and OrderByDescending) and bind to the result. The same goes for filtering with Where.
PIEBALDconsult wrote: Does your solution allow multi-level sorting? Nope, should be a new value in the drop down, like "name then title".
PIEBALDconsult wrote: I'm unclear on the details of what you have, but I would consider having each Item in the DropDown know what it is supposed to do -- perhaps a class with a Name and a Delegate -- so all you need do is add a new Item to the DropDown. That's exactly what I have
The code I posted above could be called as follows:
comboBoxOrdering.Items.Add(SomeFunction("Name", Queryable.OrderBy, q => q.Name)); I need all the generics so my IntelliSense (and compiler) knows that q is actually some type that has a Name property
And I'm having something similar for the filter functionality (which is also a dropdown).
comboBoxFilters.Items.Add(SomeFunction("Active only", Queryable.Where, q => q.Active)); So even if you couldn't read the code above, I'm pretty sure you could use it
|
|
|
|
|
Sander Rossel wrote: That's exactly what I have
Oh. Well, alright then.
|
|
|
|
|
A shame you didn't recognize it. It's an indication that my code is, indeed, 'clever'... Not sure how to make it more readable though (I guess this is the part where it becomes a programming question ).
|
|
|
|
|
Have you considered adding a comment? I find that's generally a good idea for clever code (with or without quotes).
|
|
|
|
|
It's funny you should say that.
While you certainly make a valid point allow me to explain why I don't think that's the solution.
If the code is so unclear it needs comments I really think you should stop and have another look at your code.
Try rewriting it so that it shouldn't need comments (which is what I did).
If there's really nothing else you can do you can use a comment, but I highly discourage it.
I've said it before and I'll say it now; comments are the evil of this world
In fact I've had so much bad experiences with comments that I've written a tip about it a few years ago.
If you're interested: Write comments that matter[^].
Thanks for the tip though
|
|
|
|