|
The Unspeakable Law:
As soon as you mention something, if it is good - it goes away; if it is bad - it happens.
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
|
|
|
|
|
Thanks for the warning.
"There are three kinds of lies: lies, damned lies and statistics."
- Benjamin Disraeli
|
|
|
|
|
Hopefully, any fixes coming down the pipe will fix what's wrong with mine lately.
In Facebook messenger, if I try to activate the camera to send my wife a selfie or whatever, the Messenger app closes.
I don't know if it's the camera (which works fine on it's own), or Messenger (which works fine, otherwise), or the OS being stupid.
|
|
|
|
|
First there was a Console and "Hello World"
Console.WriteLine("Hello World");
but there was no sepration of concern so we created a method that returns the string
SayHello()
{
return "Hello World";
}
But it was missing business layer so we created a library and migrated method there
namespace something.BL
{
public class SomeClass
{
SayHello()
{
return "Hello World";
}
}
}
But there was a database we wanted use so moved it to database and created a data layer to be called from BL.
namespace something.DL
{
public class SomeDLClass
{
SayHello()
{
var message = ctx.HelloTable.Select(x=>x.Message).First();
return message;
}
}
}
But our web page was empty so we used Webforms to show it to the world.
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostBack)
{
var result = BL.SayHello();
lblMessage.Text = result;
}
}
But Webforms are things of the past so migrated it to MVC
public class HomeController : Controller
{
public ActionResult Index()
{
var model = BL.SayHello();
return View(model);
}
}
But that was not good as it slowed down page load so moved it out of MVC to make an AJAX call using JQuery.
$.ajax({
url: '/api/Hello/GetHello',
type: 'GET',
dataType: 'json',
success: function (data, textStatus, xhr) {
$('#someId') = data;
},
error: function (xhr, textStatus, errorThrown) {
console.log('Error in Operation');
}
});
But JQuery is directly manipulating DOM so we moved to Angular/VueJs/Aurelia etc.etc.
Let use {{message}} to bind to label and create a module to house the application
and a componenet that calls an Angular service which in trun calls Web API and returns Observable.
HtmlPage->Angular Component ->Angular Service ->Web API and back again.
What will be next for the poor old "Hello World" ?
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
You forgot DNA#
AT
T--A
A----T
T-----A
T-----A
G----C
T--A
GC
CG
C--G
A----T
A-----T
T-----A
A----T
A--T
GC
AT
C--G
T----A
C-----G
T-----A
G----C
C--G
CG
AT
A--T
T----A
A-----T
A-----T
G----C
A--T
GC
TA
G--C
T----A
G-----C
C-----G
C----G
A--T
GC
TA
G--C
A----T
G-----C
A-----T
C----G
A--T
CG
GC
A--T
A----T
C-----G
A-----T
C----G
A--T
CG
GC
A--T
T----A
G-----C
A-----T
G----C
A--T
CG
GC
A--T
G----C
A-----T
A-----T
T----A
A--T
TA
AT
T--A
G----C
A-----T
A-----T
A----T
G--C
AT
AT
G--C
T----A
G-----C
A-----T
G----C
G--C
AT
TA
T--A
A----T
G-----C
G-----C
A----T
A--T
TA
AT
T--A
A----T
T-----A
G-----C
A----T
T--A
TA
AT
G--C
A----T
T-----A
A-----T
T----A
G--C
AT
TA
T--A
A----T
G-----C
G-----C
A----T
A--T
AT
AT
T--A
G----C
A-----T
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
This code sucks.
Why aren't you using dependency injection?
I had expected some sort of repository pattern.
Your code that returns "Hello World" should implement an IHelloWorld interface.
You probably want to make a base class as well so implementers have something to go with out of the box.
I don't see any unit tests, so how do you know this works?
Also, where is the documentation? No programmer is ever going to understand what you wrote. Because you do everyone should, right?
And do you have a build server?
We want to make sure our code is validated as soon as it's put into source control.
You need it all, unit tests, database tests, UI tests, API tests, pen tests, integration tests, static code analyzers and, of course, automatic deployment.
Please read a book before you post some quick and dirty code in here
|
|
|
|
|
... such stuff as dreams are made on
|
|
|
|
|
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
You forgot AI. The code needs AI. At least 3 tablespoons of AI.
/ravi
|
|
|
|
|
And also this NuGet stuff is missing
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Yep, woefully under-engineered!
We should have an inverse "code golf" tournament where the winner is the person who produces the longest version of "Hello World."
Slogans aren't solutions.
|
|
|
|
|
They already did something quite similar here[^].
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
Ah, so they did, along with this one which is an even closer challenge.
I often wonder what the code golf community could achieve if they ever applied themselves to something useful!
Slogans aren't solutions.
|
|
|
|
|
Sander Rossel wrote: Please read a book
I don't think such a book exists. You should write it!
Marc
|
|
|
|
|
The books in my signature will take care of the OOP and database issues.
As for the CI aspect, I'm currently working on it!
|
|
|
|
|
I think he meant this one[^].
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
You sir are right. I should walk back to my cubical and start refactoring at once.
By the way I read your SQL book. One thing I am really thankful for is new shortcut I learned Ctrl+Shift+R to refresh SSMS cache.
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
virang_21 wrote: I read your SQL book Awesome, thanks!
virang_21 wrote: shortcut I learned Ctrl+Shift+R to refresh SSMS cache If that's the only thing you've learned from my book I'll call that a win!
|
|
|
|
|
I think it's examples like this that Joel Spolsky had in mind when he coined the phrase "Astronaut Architects"
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." - C.A.R. Hoare
Home | LinkedIn | Google+ | Twitter
|
|
|
|
|
The major fault here is that it should include multilingual support: Globalization is important, you know!
And where are the unit tests?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Interplanetary support should be included, too. What happens if the code is run on Mars?
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
|
|
|
|
|
The real problem will be translating it to Vogon Poetry.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Vogan Poetry
Oh freddled gruntbuggly,
Thy micturations are to me,
As plurdled gabbleblotchits,
On a lurgid bee,
That mordiously hath blurted out,
Its earted jurtles,
Into a rancid festering confectious organ squealer. [drowned out by moaning and screaming]
Now the jurpling slayjid agrocrustles,
Are slurping hagrilly up the axlegrurts,
And living glupules frart and slipulate,
Like jowling meated liverslime,
Groop, I implore thee, my foonting turling dromes,
And hooptiously drangle me,
With crinkly bindlewurdles,
Or else I shall rend thee in the gobberwarts with my blurglecruncheon,
See if I don't!
Zen and the art of software maintenance : rm -rf *
Maths is like love : a simple idea but it can get complicated.
|
|
|
|
|
Could be worse.
Could be Paula Nancy MiIllstone Jennings.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
That's easy:
int main(void)
{
printf("Goodbye, World.\n")'
return 0;
}
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
|
|
|
|