|
Sounds like a case of the wrong tool for the job. Implicit enums are great for representing a fixed set of ideas/behavior (like flags) that isn't mapped to specific values. If you need a fixed set mapped to specific values use explicit enums
|
|
|
|
|
Precisely. Even if I'm used to always explicit the enums - mainly because I work with a system that has a lot of marshalling and communications between different paradigms so more often than not I end up having to fix those values sooner or later.
* CALL APOGEE, SAY AARDWOLF
* GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
* Never pay more than 20 bucks for a computer game.
* I'm a puny punmaker.
|
|
|
|
|
My guess, he didn't know. Self-tough programming. What so superior about coding manually. The point of using enumeration is to allow the compiler to check for potential human errors. Tell him to go back to school.
|
|
|
|
|
I'd guess he did learn to code in school. Meaning he had coding courses, learned nothing (as usual, because those courses invariable suck), and then assumed he would not need learn any further.
|
|
|
|
|
Whats the language that can use a string in a switch statement?
|
|
|
|
|
I think the snippet is in C#, which does allow that.
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???
|
|
|
|
|
OK, makes sense. C++ allows for a lot of this kind of thing through operator overloading, though I tend to be a pure C programmer, and I like the level of clunky direct control you have of the code with C.
|
|
|
|
|
Just read the user manual that came with the WookieTab, and thought I'd share.
Are you sitting comfortably? OK, lets begin!
Dear users, Thank you for your purchase of CHUWI products Hi12Series Tablet poly nuclear, Hi12 is a quad-core Tablet PC products CHUWI well - launch of the brand can swim the internet.
This poly-core series Tablet PC can' t suffer drip and splash water, and can' t place it beside such as full glass of Liquid body.
Ah...bliss. Reminds me of the early Japanese motorcycle manuals, where someone at Suzuki had difficulty with the "f" in "shifting" - leading to a whole chapter talking about "if you have difficulty in shiting ..."
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: if you have difficulty in shiting ...
... then take a Chuwi tablet three times a day.
OriginalGriff wrote: full glass of Liquid body
Yum, soylent green!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Old Italian IBM manuals are still renowned for their translations of "mouse balls" which was quite literally "mouse b*ll*cks".
* CALL APOGEE, SAY AARDWOLF
* GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
* Never pay more than 20 bucks for a computer game.
* I'm a puny punmaker.
|
|
|
|
|
Are you sure they didn't want to mean "liquid nitrogen"?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
I used to love reading the user manuals that came with oriental products in the 1960s. I wish i still had some of them.
We're philosophical about power outages here. A.C. come, A.C. go.
|
|
|
|
|
The fun has not ended yet. Take at look at the Top 10 Best Photography Lighting Sets In 2017 Reviews, and you will find this for the Neewer 600W kit:
"With some magnificent features and productivity, this lighting set furnishes its users with the most extreme nature of lighting. There are a couple of positive conditions that are given moreover offered by this pack. This master pack can be a perfect ruffle for advancing any things, cutting edge, photo workmanship, moreover particular photography.
This set is open at to a great degree mind boggling and sensible cost. Everything is created use premium things, so they can continue going for a long time. There are a couple of profitable things that are open in this kit, for instance, streak lights, umbrellas, fragile boxes, light stands, creature abode passages, and whatever different well-known things.
Among the numerous expert studio photography lighting kits, the Studio Pro has set some unsurpassable elevated requirements that made it a standout amongst the most well-known available today. Including magnificent features and capacities with regards to ideal outcomes, this pack deals with each picture taker’s need."
|
|
|
|
|
Some years ago I had the manual for a "general remote control" on my office door. And even if the words in the manual were swedish it was fairly easy to figure out the text in the english original.
It started off congratulating to the purchase of this device. However it had stopped being a "general remote control" and turned into a, if I translate it back to english, "public distant control". It didn't get any better after that.
|
|
|
|
|
I suggest scanning them and submitting the results to engrish.com[^]
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Today I Learned that there is such a thing as a PHP obfuscator.
GitHub - pk-fr/yakpro-po: YAK Pro - Php Obfuscator[^]
As if PHP wasn't obfuscated enough by nature.
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.
|
|
|
|
|
Quote: Removes all comments, indentation, and generates a single line program file.
Obfuscates if, else, elseif, for, while, do while by replacing them with if goto statements.
Obfuscates string literals.
Scrambles names for:
Variables, Functions, Constants.
Classes, Interfaces, Traits.
Properties, Methods.
Namespaces.
Labels.
So not much to do for most of the sources.
|
|
|
|
|
Something like this
function obfuscate($php) {
return $php;
}
|
|
|
|
|
What are you doing here, making fun of PHP? Your beloved MordorScript shares many of the features that make PHP so laughable.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
What makes you think I like MordorScript?
|
|
|
|
|
You are always on about something that has to do with it.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Model - View - ViewModel is the common architectural base of WPF applications: the View knows its ViewModel, which in turn knows its Model; the model doesn't know a ViewModel, and the ViewModel doesn't know a View - the latter one is an observer of the NotifyPropertyChanged events only.
Now I see a pattern in the ViewModel code of a master of WPF:
. public SomeViewModel(string title)
{
_OkPressed = false;
_SomeForm = new SomeForm();
_SomeWindow = new Window
{
Title = title,
Content = _SomeForm,
...,
};
_SomeWindow.Activated += _SomeWindow_Activated;
_SomeForm.DataContext = this;
...
} Is it necessary to note that SomeForm is a UserControl?
At my first programming job - 17 years ago, VB6 - I was taught to separate UI concerns from other code, and I follow that principle since then. Others haven't learned that after more than 25 years in IT. Well, experience should not be measured in years...
|
|
|
|
|
Oh dear. Oh dear indeed.
This space for rent
|
|
|
|
|
OK, I'm going to dive in here and expose my ignorance. I'm quite new to MVVM -- been working with it for less than a month -- and I understand the objectives of "Separation of Concerns", but it is not obvious to me why this code is facepalm. Could you walk me through an example of how this particular design might cause problems down the line?
On a similar note, I was recently describing "pure MVVM" to a colleague and I found myself struggling to provide a compelling reason to avoid all code-behind. He asked, "what difference does it make if I bind to objects in the code-behind rather than to objects in a separate 'ViewModel' class?"
Troelsen's sixth edition of "Pro C# 5.0" (published in 2012) has 3 or 4 chapters on WPF, but doesn't even mention MVVM or ViewModels, and instead puts all code in the codebehind. Help me understand why this is so problematic.
|
|
|
|
|
The "justification" of these patterns had a lot to do with the notion that we could have "visual designers" (who "can't program") and programmers (who "can't design UI's") work together to create an application.
The visual designers create the "views" (i.e. using Blend); the programmers create the view-models and models; and everything magically comes together.
In reality, the visual designers do their own thing using PhotoShop; using features that won't import into Blend; and having no appreciation for the "patterns" that have been established by the MVVM community; i.e. simplistic LOB (line-of-business) CRUD views (create; read; update; delete).
So, MVVM adherence is directly proportional to the numbers of developers on a project, the simplicity of the (LOB) app, and the fanaticism of whomever is the resident MVVM champion (if there is one).
(There is a reason why the many galleries of MSDN programming examples only feature MVVM as another "example": because they are not "typical").
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
modified 2-Feb-17 12:19pm.
|
|
|
|