topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday June 5, 2025, 7:40 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 152 153 154 155 156 [157] 158 159 160 161 162 ... 438next
3901
General Software Discussion / Re: Good coding conventions - Discussion
« Last post by Renegade on December 30, 2012, 09:57 PM »
I sorta get the use of dividers, but what am I missing about Underscores vs Dashes? I somehow mind dashes less, and I have no idea why.

What language are you using? Dashes aren't legal in a lot of languages (I can't think of one where they are legal) because that creates ambiguity, e.g.:

Code: C# [Select]
  1. int something = an-integer - another-integer;

Compared with:

Code: C# [Select]
  1. int something = an_integer - another_integer;
3902
General Software Discussion / Re: Good coding conventions - Discussion
« Last post by Renegade on December 30, 2012, 09:48 PM »
My coding style is an ecclectic mixture of thing I picked up along the way. This is a side effect of being self taught, as thre was no one to force me to do things their "correct" way. However one thing that has proven handy is that in addition to commenting I always put a header comment above each function stating (in short) what it is/does.

In Visual Studio with C# you can add comment documentation above a method very easily by using 3 slashes:

///

In the past I've kind of ignored doing that, but I've learned that it is a very, very nice little feature, and that it's best to take advantage of it whenever possible.

Here's a simple example:

Code: C# [Select]
  1. /// <summary>
  2.         /// A simple constructor override to let you set the HTML of the browser and create an arbitrary number of buttons.
  3.         /// </summary>
  4.         /// <param name="html">The HTML for the browser.</param>
  5.         /// <param name="buttonTexts">The text for each button. The form returns the text value for the clicked button when it closes.</param>
  6.         public HelpWindow(string html, string[] buttonTexts)

You get the summary and a field for each parameter all for free when you type ///. Very simple, fast and elegant.
3903
General Software Discussion / Re: Good coding conventions - Discussion
« Last post by Renegade on December 30, 2012, 11:41 AM »
Ah... I see someone is looking to start a war! ;D

Pascal for this, camel for that, CAPS for another, and _these get underscores, while strThose get a pretty prefix, and so do btnThese. :D

Object.toString() or Object.ToString() or Object.tostring()?

I stick mostly to C#, Java, C and VB naming conventions. I like a bit of this and a bit of that. e.g. I like private field names with an _underscore and camel case:

_somePrivateFieldName

I'm not fond of:

m_something

I like public properties in Pascal case:

SomePublicPropertyName

I also like method names in Pascal case.

I like controls in Hungarian:

btnGoButton
pbxBigPictureBox
wbrMainWebBrowser
lblInputLabel
txtTextbox
etc.

While this is short:

if (condition)
   DoSomething();

I prefer:

if (condition
{
   DoSomething();
}

It's just easier to see/read when skimming. I'm not usually very fond of:

condition ? DoSomething() : DoNothing();

It has its uses, but often it's harder to read. Sometimes it is easier... depends... No right answers as far as I can see. Verbose and terse both serve a purpose.

I think following conventions is more important when you work in larger teams, and especially when other people, that you will never meet, end up using/modifying your code.

I do like lots of comments though.

Reading on variable types really is essential for a language though. Some languages do things that you would NEVER expect with some types, and as you're reading through, you end up going, "Ah... now I see what that didn't work..." They usually all make sense in their own contexts. Just different flavours. e.g. If you allocate memory for an integer but don't assign a value, what is the value? zero? null? Both are valid assumptions. Same for a string. Is it null or empty?
3904
Living Room / The Marcahuasi Project
« Last post by Renegade on December 30, 2012, 10:20 AM »
This is a pretty cool project that puts archaeological and ancient sites on a map. More than than, but check the links. Could be fun when planning the next family vacation! :)

https://maps.google....pn=143.06,359.648437

https://sites.google...e/marcahuasiproject/

Crowd-sourced collection of markers to get a decent display of archaeological, megalithic, religious, mysterious and unexplainable sites found all over the world. Started by Jaimy Visser on April 4th 2012, it currently has nearly a thousand markers.

Image of what each color represents can be found here : http://tinyurl.com/brku76s

Please note that not all of these markings are 100% accurate.

LIKE the project on Facebook!
https://www.facebook...om/MarcahuasiProject

https://sites.google...e/marcahuasiproject/

Feel free to contact me in case you want to add information about something near you - providing coordinates and a website for more information will make it alot easier for me.
3905
New Oatmeal state of the web:

http://theoatmeal.co...tate_web_winter_2012
3906
Living Room / Re: The Rant Thread!
« Last post by Renegade on December 29, 2012, 11:24 PM »
Grrr, argh! I'm angry! Everything is great an I have nothing to rant about! Grrr, argh! :P
3907
Developer's Corner / Re: Enlightenment 0.17 is out! (With awesome web page copy!)
« Last post by Renegade on December 29, 2012, 06:12 AM »
I tried enlightenment way back in 2001 or 2002 I think, and LOVED it! It's the best desktop I've used so far. It's just so elegant. I know a lot of people hate it, but man... it's just so simple and elegant to use.
3908
Living Room / Re: Companies Keep Us Buying New Stuff
« Last post by Renegade on December 29, 2012, 06:06 AM »
Just watched that documentary again. Good stuff.

Here are some links for anyone interested:

http://topdocumentar...ght-bulb-conspiracy/
http://www.disclose....untold_story_of_Pla/


3909
Living Room / Re: Companies Keep Us Buying New Stuff
« Last post by Renegade on December 29, 2012, 04:29 AM »
planned obsolescence I tell ya.  more info

+1

Here's a good documentary on the topic:

http://duckduckgo.co...%20bulb%20conspiracy

You can probably find it on Youtube or Vimeo somewhere.

What just kills me is the enviro-green-nutters that will scream bloody murder about recycling newspaper (or whatever), but refuse to recognise that the RRR is REDUCE Reuse recycle, with REDUCE being #1 for a reason. PO is completely antithetical to any kind of morality or ethics, and certainly one of the greatest reasons for pollution. It just seems so obvious. I fail to understand why people don't get upset about this (PO), but then get angry about what kind of lightbulb someone uses.
3910
I heard about a marketing fail where they used the baby on the jar in some place in Africa, but people thought it was jarrred babies as it was usual there to put what was in the jar/can on the label. Not sure if that's true or not. Could be. Dunno.
3911
If you look through the full thread, Mauro seems pretty reasonable and level-headed.

No argument there. I did read through it, and he was certainly much nicer than Linus there.
3912
Kind of bizarre how the f-bomb is front page news in real life, but you hear it 20x in any given TV show/movie and don't think twice about it.
I don't think there'd have been a lot of fuzz if it was just that word - it's the general level of rudeness (perhaps even hostility?) being shown by Linus that does it.

Could be.

From the email that set him off:

Btw, why pulseaudio is even trying to access a V4L2 control?
I would expect an audio application to take care of its own audio
business, and to not try to access other random Kernel APIs.

In other words, only an application that handles video should be
using those controls, and as far as I know, pulseaudio is not a
such application. Or are it trying to do world domination?

To be honest, that sounds like a bit of a silly comment. I can see how that would set someone off. What APIs an application accesses isn't really relevant - only that it DOES access the API.

3913
Slashdot and Google reader :)

Yeah I got wind of it from Slashdot too. So semi-suddenly it has become tech news.

Kind of bizarre how the f-bomb is front page news in real life, but you hear it 20x in any given TV show/movie and don't think twice about it.
3914
Read through the thread there. Interesting issue. The email that set off Linus, well, you need to read it yourself.

But very interesting find --- how did you come across that? It's a REALLY esoteric type of issue.
3915
One problem that you cannot escape is that Windows stores all kinds of baggage that cannot be safely removed from the system drive. Your Windows installation becomes more and more bloated over time, so start thinking about that and plan for your system drive to become virtually unusable at some point. It WILL happen. 383 KB here and 68 MB there and another 138 MB here and maybe a GB over there... It all adds up, and you risk destabilizing your system if you start farting around with moving/deleting those files.

I've just replaced a 128 GB SSD with a 256 GB SSD for pretty much that reason. I kept the OS, programs, and a small amount of current work/files on the system drive, with most files being on externals/NAS.

I figure that if at all possible, portable software is the best way to go. This insanity with the way many programs get installed on Windows with fixed paths and all that silliness, well, it just kills any real potential to stay properly organised.

I wouldn't worry about partitioning the SSD though. SSDs don't suffer from fragmentation like HDDs, so you have no worries there. Defragmentation of an SSD is counterproductive. So, you're pretty much left with the best option being just to leave it as a single volume, unless you have some kind of an organizational reason that would override how quickly a Windows installation can get bloated on a small drive.

Oh, do keep in mind that I've had to install some programs that take up multiple GB of space, e.g. Adobe Creative Suite, Visual Studio, etc. So, I kind of trashed a bit of the storage that way.
3916
Living Room / Re: 3D Printing Under Attack
« Last post by Renegade on December 28, 2012, 05:54 PM »
Here's an interesting bit from James Corbett on 3D printing:

http://www.corbettre...lutions-3d-printing/



The show notes at the link above are excellent, with time references and links to additional materials.
3917
General Software Discussion / Re: Purging old stuff off your comp
« Last post by Renegade on December 28, 2012, 05:49 PM »
I think at some point you are better off backing everything up and then starting with a fresh install of Windows, rather than doing major uninstallations of dozens of apps.

Hehehe! Just did that. :) Still in the process of reinstalling a lot of stuff though...
3918
Developer's Corner / Re: Learn C (and other things...) the Hard Way
« Last post by Renegade on December 28, 2012, 05:36 PM »
Expresso is another good program for writing and testing regex.
3919
General Software Discussion / Re: Purging old stuff off your comp
« Last post by Renegade on December 28, 2012, 05:24 PM »
Sigh... Digital packrats that we are...

I've got a bunch of drives sitting idly by... Too much of a packrat and too lazy to do anything about them. (They've been backed up even.)

I just installed a new drive on this computer - restored an image for a clean install - still have the old drive ready to boot off of... Can't let it go "just in case"... Which is a good thing at the moment because there are still things on it that I need to use and have to reboot for...

And then there are the external drives... and the NAS... and the optical media... and...

Not deleting it all quite yet...
3920
Living Room / Re: Gadget WEEKENDS
« Last post by Renegade on December 28, 2012, 08:43 AM »
Ok today I'm posting about a cheap gadget that I think everyone should have.
It's a battery-powered water leak detector.
...

I could have used one a little while back. The hot water heater sprung a gushing leak out of the blue... really nasty - spraying all over with a good amount of pressure. I luckily caught it within an hour or 2, but still... there was a lot of water and a nasty mess to clean up.

Seems like a really good thing for the laundry room.
3921
Developer's Corner / A Browser Control
« Last post by Renegade on December 28, 2012, 06:14 AM »
Just a friendly heads-up for anyone that needs a browser control...

Check out Awesomium. It seems to be much better now than before.

http://awesomium.com

I've tried pretty much everything out there, and this seems pretty good. My current criteria is for displaying static HTML very quickly, which the default VS WebBrowser control doesn't do. This one pops up the window and loads the HTML pretty much instantly.

(Do make certain to double buffer any forms though -- otherwise you get flickering - a well known issue for WinForms.)
3922
DC Gamer Club / Re: Desura - any one able to get to the website or login?
« Last post by Renegade on December 28, 2012, 05:43 AM »
It's not just you! http://www.desura.com looks down from here.

http://isup.me/www.desura.com

Looks like it's down.
3923
N.A.N.Y. 2013 / Re: NANY 2013 Pledge: Blast Off!
« Last post by Renegade on December 28, 2012, 04:03 AM »
Weird bug. I'm not sure if that's a problem with your browser or the webplayer but either way I'm pretty sure it's beyond my control.

Thanks for giving it a try. Did you see the fireworks? :-*

I've not tried Unity, so I don't really know much. Just thought I'd mention it in case it's some kind of typical "gotcha". I've seen weirder issues. :)

If by fireworks, you mean the rockets blowing up... Yeah... Lots. I kind of sucked at it and had most of my ships destroy. Well, all but 1. :D I'm not taking home any awards there! The explosions were pretty cool. Nice physics there.

I've got to get into actually doing some game programming one of these days. It's just that every time I look into it, tutorials jump so far ahead that I'm wondering what just happened. Or, maybe I just skimmed too fast...
3924
General Software Discussion / Re: WYSIWYG html/xml creator
« Last post by Renegade on December 28, 2012, 03:56 AM »
can I load these in Aptana?

http://jqueryui.com/resizable/

Yup! Aptana is fantastic for JavaScript.
3925
N.A.N.Y. 2013 / Re: NANY 2013 Pledge: Blast Off!
« Last post by Renegade on December 28, 2012, 12:11 AM »
Anyone want to test out my awful preview build?

It's a lot harder than it looks.

BTW - When I closed the page, the screen stuck around. I had to close Opera to get rid of it. Here's a screenshot.

Screenshot - 12_28_2012 , 5_09_20 PM.png
Pages: prev1 ... 152 153 154 155 156 [157] 158 159 160 161 162 ... 438next