|
Today I had to call a function taking two int pointer arguments for returning some stuff. But I wasn't interested in those returned values (I tried with 2 nullptrs but fail) so:
int result = peskyFunction(new int,new int);
|
|
|
|
|
Won't those two int's leak?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Absolutely (100% incontinence) but:
1) it was some demo PoC
2) that function is initialization stuff so it will only leak once (or rather twice )
|
|
|
|
|
I'm almost certain everyone here is dirty. This is all that it takes:
(void*)pValue
It's even more exciting (meaning dirty) coming out the other end...
|
|
|
|
|
I think most programmers aren't to keen on personal hygiene
My blog[ ^]
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
Concerning "personal code hygiene" I have other experience. I was always the "only" one who was prepared to do such dirty "fixes"
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Wow, where I come from people don't even recognize dirty
Unfortunately, in software development, dirty is often a synonym for practical
My blog[ ^]
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
Quick, not practical.
Reusable is practical.
|
|
|
|
|
Jörgen Andersson wrote: Reusable is practical. One word: YAGNI... Or is that five words?
My blog[ ^]
public class SanderRossel : Lazy<Person>
{
public void DoWork()
{
throw new NotSupportedException();
}
}
|
|
|
|
|
Here's another dirty trick:
objects that are only created at program start up don't need to be deleted (because all memory is freed after application close)
Don't cringe - we are talking about dirt after all!
|
|
|
|
|
Thank you for this!
I think next discussion I will start is "program dirty to me", but I think than I have to move to soapbox
Bruno
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Bruno Sprecher wrote: pragmatic
Right.
Explaining "handedness" in under 488 pages of English translation when all one really needs to mention is that what's at operation is a conspirator's dirk or a brother's rock.
|
|
|
|
|
Thank you
modified 19-Jan-21 21:04pm.
|
|
|
|
|
CNX[^].
Part of the OpenStax[^] Ecosystem.
These books are top-notch and high quality.
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???
|
|
|
|
|
Very cool!
Will Rogers never met me.
|
|
|
|
|
Yes, they are. My Psych class is using one. That's how I learned about the site.
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 went to the site, and tried searching C#: no results. I tried selecting the subject-area "Science and Technology" from the subject-area selector drop-down: a minute later still no results presented.
I tried entering "programming" in the search field: about a minute later a variety of results presented including "Independence for Texas" and other clearly non-science/technology related entries which, of course, just means they are doing a word-usage search.
I'd say the site has a ways to go.
But, why don't you list this in the "Free Tools" forum here ?
«I'm asked why doesn't C# implement feature X all the time. The answer's always the same: because no one ever designed, specified, implemented, tested, documented, shipped that feature. All six of those things are necessary to make a feature happen. They all cost huge amounts of time, effort and money.» Eric Lippert, Microsoft, 2009
|
|
|
|
|
|
Hi Ranjan,
I think that site is making pirated copies available, suggest you re-consider posting link.
«I'm asked why doesn't C# implement feature X all the time. The answer's always the same: because no one ever designed, specified, implemented, tested, documented, shipped that feature. All six of those things are necessary to make a feature happen. They all cost huge amounts of time, effort and money.» Eric Lippert, Microsoft, 2009
|
|
|
|
|
Hi BillWoodruff,
Yes I believe so. Based on the below quote, I thought it's fine for personal use. These days it's so difficult to say what is legal and illegal. Not sure how this site is running? Sounds crazy and I don't understand their intent in hosting ebooks.
IT Books Quote: Reproduction of site books is authorized only for informative purposes and strictly for personal, private use.
Ranjan.D
|
|
|
|
|
Coolness maximus! +5
/ravi
|
|
|
|
|
I am reading C# In Depth right now.
It is fantastic. If you read just the first part of the first chapter you will be hooked.
Read the exceprt at amazon and you'll be amazed.
C# In Depth - amazon link[^]
It takes me quite a while to read it to really absorb it and I've read but it is so amazing how Skeet (author) takes you back to C# 1.x and builds from there.
It is the first time the lambda syntax has ever made sense and this is just the first chapter.
Have any of you read the book? I'm about half way through the 2nd chapter and he's explaining delegates and events like no one else too and it's all building. Really great stuff and so clearly written.
|
|
|
|
|
I'm also about half way. Agree it's a very good book
|
|
|
|
|
Looks like a good read thanks
New version: WinHeist Version 2.1.0
There's a fine line between crazy and free spirited and it's usually a prescription.
I'm currently unsupervised, I know it freaks me out too but the possibilities are endless.
|
|
|
|
|
We used to have a joke at work when facing a difficult issue or problem... "What would Jon Skeet do now?"
|
|
|
|