|
Parse about the codedom go
Make the types in shadow show
All the ways in which they know
When witch will be and gone they go.
Double, double toil and trouble;
Fire burn and cauldron bubble...
|
|
|
|
|
That sounds about right.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Tim Deveaux wrote: Double, double toil and trouble;
VB burn and sorting bubble...
FTFY!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I used to create some graphics to my kids for birthday parties and special blessings and such...
I look for some free stuff, use it to build my own, and credit the source, which actually makes it look more professional like...
Yesterday did the same for sime upcoming Hanukka pary, but Google returned only payed sites in the result. I had to go to the 5th page to find something free...
Made me wonder...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
Maybe, we need to rename the Google search algorithm as "Paid Page Rank", instead of just "Page Rank".
|
|
|
|
|
I think just "Rank" (as in stinks) sums it up much better
|
|
|
|
|
I guess you need to compare with DuckDuckGo.
The reason Google has stayed in business this long ids that they've manage fairly well so far to keep the ads non-intrusive. This might be nearing its end.
Remember Altavista? It was the leading search engine until DEC sold it, and the streamlined interface was no more.
|
|
|
|
|
Interesting - it brings totally different results for the same query... And the difference is between the free and the payed...
I may duck Google search...
"The only place where Success comes before Work is in the dictionary." Vidal Sassoon, 1928 - 2012
|
|
|
|
|
So I use Is and Has differently on my property and field names, depending on what they do.
Is implies the state of something, whereas Has implies containing something.
I've even had to use both for the same item. On my FSM code I have IsAccepting and HasAccepting, the first indicates whether the state is accepting, the second indicates whether itself or any states it contains is accepting- basically if it has any accepting states. Heavily commented in that case, and is fortunately the only place I've ever had that happen.
But it leads me to weird things like "IsEnded" instead of "HasEnded"
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
If a State object can be accepting when its IsAccepting property is true , I recommend renaming HasAccepting to HasAcceptingStates .
#readability
/ravi
|
|
|
|
|
I considered that too. It conflicted with another method that operates on a collection of otherwise potentially unrelated states, but then I ended up renaming it later to HasAnyAcceptingStates()
The api is kind of confusing because of the self-repeating, fractally nature of state machines like this. There are all kinds of subtly different but highly related operations on them. Even shoring up the API and naming took me going back to it over the years, never 100% satisfied, but it's more or less frozen at this point.
And, given what I've seen of the other similar APIs out there (usually in Java), mine is far cleaner. They're all nasty. Mine at least reins in the crazy somewhat, but then I'm sure everyone thinks that about their own code
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
this is strange... and has some weirdness to it too!
|
|
|
|
|
IsNull or HasValue?
|
|
|
|
|
I'd prefer IsNull or IsEmpty (depending on what it was)
but actually for those things I typically sidestep it altogether with
bool TryGetValue(...,out T value)
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Use YodaNaming: "EndedItIs" and "EndedItHas" - that way masked nicely any confusion is.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
they would match my yoda conditionals like
if(null!=str) ...
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
States
GetStates(State state) => IEnumerable<State>
GetAcceptingStates(State state) => IEnumerable<State>
GetNonAcceptingStates(State state) => IEnumerable<State>
GetStateStatus(State state) => enum
SetStateStatus(State state) => bool ? or error code ?
HasAcceptingStates(State state) => bool
IsStateAccepting(State state) => bool
«One day it will have to be officially admitted that what we have christened reality is an even greater illusion than the world of dreams.» Salvador Dali
|
|
|
|
|
That's very close to how it ended up.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Is this simply confusion with IS_A and HAS_A ?
|
|
|
|
|
I WOULDN'T EVEN NAME MY CONSTANTS LIKE THAT.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
Those are concepts; not code.
|
|
|
|
|
I'm just messing with you.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
honey the codewitch wrote: But it leads me to weird things like "IsEnded" instead of "HasEnded" No criticism intended, but I use:
public bool Ended
{
get
{
bool value = false;
return value;
}
} I've never liked the IsCondition or HasThing naming style, probably because they have a whiff of Hungarian notation about them.
Software Zen: delete this;
|
|
|
|
|
when I'm in .NET land I adhere closely to the .NET naming conventions.
Over the years I've become far less about personal preference, and far more about when in Rome.
At best i tend to build on them rather than change them.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
|
|
|
|
|
honey the codewitch wrote: far more about when in Rome I have to do that a lot more now than I used to. My group has been down-sized from 17 to 5 people over the last 5 years, and so I get to maintain a fair amount of other folks' code. Sometimes it takes a shot of whiskey with a Zofran[^] chaser to stay consistent with how they did things, but as long as it pays the bills...
Software Zen: delete this;
|
|
|
|