Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Biggest Visual Studio defect: Runs on Windows (Score 1) 543

There is a product by a company called Xamarin that lets you write C# and compile it for many platforms - iOS, Android, Mac, and Windows. You can either develop in their IDE, or treat their product as a plugin to Studio.

There's also Mono. The ServiceStack web services framework is completely portable between windows and mono on linux.

Or you can use PyTools (http://pytools.codeplex.com/) to write python.

It's still predominantly used for Windows. But the other opportunities are much more than they used to be.

Comment Re:Getters and setters (Score 2) 543

Not mentioned in the other responses is the opportunity to use the "resource acquisition is initialization" or "lazy loading" pattern. You may have a field that gets populated by a relatively expensive operation like a database query. So your options are to fill it in during the object initialization. Or to have a get method that will check whether the private variable it exposes has a value yet. If not it goes and fills it in and then returns it. If you access that field in ~50% of your uses of the object you've saved a ton of database queries. The the calling code just uses CompanyConfig.AllowSomeOption freely.

That requires you to actually code that of course. The automatic get/set is just giving you the opportunity to do stuff like that. Once your class has exposed a public int MyField; you really can't come back later and change that. But exposing a public int MyField {get; set;} lets you come back and fill in the get/set logic when needed

Comment Re:Getters and setters (Score 1) 543

The automated get/set provides the ability to come back later and add your own custom get/set functions. Knowing that 90% of the time you never will. But if you do come back and do it, you have to do the whole shebang - declare your private variable and have the get and set operate on that variable. I believe the need for an explicit common private variable to use in both of them is why you can't leave one as automatic

Comment Getters and setters (Score 3, Insightful) 543

"One full-time Java programmer told me that he hasn’t had to manually type in any setters and getters in years, and he has a template from which all his objects are typed in automatically, thanks to the code snippet tools in his favorite editor (which isn’t Eclipse—he uses IntelliJ). Clearly, methods of automated typing seem to be a favorite among a lot of programmers. So why did Visual Studio remove a feature that facilitated this? Who knows."

Let's not mention the fact that in C# you don't need to manually type in all the getter/setter junk, just public int MyField {get; set;}

Comment Re:A sad world. (Score 1) 268

I will bet that the information in these database is used to obtain search warrants, and used in criminal prosecutions. And I will bet that the security measures on these insular, home grown database systems is woefully insufficient to ensure that it is real data, and not someone just editing the database to get a bogus warrant.

U.S. Internet Growth Stalling 318

abb_road writes "Internet usage is predicted to grow by only 1% in 2006, with uptake slowing even more in subsequent years. The article examines causes for the slowdown, including individuals who are actively choosing to not be online. These non-users cite a number of reasons for their decision, including cost and increased productivity. Is this simply a combination of luddites and a statistical quirk, or is the Internet reaching its saturation point in the U.S.?"

Slashdot Top Deals

"When the going gets tough, the tough get empirical." -- Jon Carroll

Working...