Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Dietrich
Sep 11, 2001

Nice op.

I just had tfs needlessly complicate things for me yet again, so allow me to re-endorse using Git flavored repos. Makes everything much better.

Adbot
ADBOT LOVES YOU

Dietrich
Sep 11, 2001

It's amazing how much better vb looks without stupid capitalization all over the place.

Dietrich
Sep 11, 2001

Holy poo poo why does build time on the Hosted Build Controller cost $.05 a minute?

Dietrich
Sep 11, 2001

You ever finish something really complex and want to throw up your hands and cackle "It's alive!!" the first time it runs?

Dietrich
Sep 11, 2001

The identity stuff mostly works right out of the box for me.

Dietrich
Sep 11, 2001

Microsoft's new DocumentDB looks both awesome and terrifying at the same time, but I have to ask myself why I would use it over something like RavenDB or MongoDB which would work anywhere.

Dietrich
Sep 11, 2001

A Tartan Tory posted:

Right, so if I understand this correctly now, the only way ViewModel and View interact is through data binding for both getting the user inputted variables and sending the results back. The viewmodel has the programming logic and the model has the business logic behind it (ViewModel and Model are linked).

So to do what I need to do, I need to get my inputs from View to Viewmodel using data binding, run it through the programming logic in there, then spit it back out through data binding again.

Exactly.

And then you can write unit-tests against your ViewModel or have multiple views of the same ViewModel with different controls or designs without having to change any code.

Dietrich
Sep 11, 2001

Do you need every property from both of the joined tables?

Dietrich
Sep 11, 2001

Angular über alles.

It's not that bad. Go though the Angular Tutorial thingy to get the basics.

Dietrich
Sep 11, 2001

idontcare posted:

Is it possible to do a redirect in IIS based on the username/login?

Like, say I have a bunch of users who can perform a login to see a web page by going to http://username:password(at)mywebpage.com.

However, I want to redirect certain users based on their username, so when they go to http://username:password(at)mywebpage.com, they get redirected to http://username:password(at)myOtherwebpage.com, while other users still access the original page. I've been screwing around in IIS with the rewrite rules and it seems that matches only occur after the ".com". Is it possible to do what I'm trying to do?

This is a terrible idea holy crap!

Dietrich
Sep 11, 2001

Any time you feel like you have to write a comment to explain your code, it means you need to re-write your code.

(Or you're doing something that makes absolutely no logical sense because there's a framework bug you have to deal with or something)

Dietrich
Sep 11, 2001

fleshweasel posted:

Overcommenting is terrible, and a code style that "documents" itself well is important, but it's too much to say that good code never warrants comments.

I didn't say that, though.

Dietrich
Sep 11, 2001

Why the hell is Random.Next() not thread safe?

Dietrich
Sep 11, 2001

ljw1004 posted:

We're actually planning to adopt NuGet wholeself, so the .NET framework itself will be just represented as a collection of NuGet dependencies. In such a world, you might have a dependency on a System.Core NuGet package, and one on System.Xml NuGet package, and one on System.Collections.Immutable NuGet package. http://blogs.msdn.com/b/dotnet/archive/2014/12/04/introducing-net-core.aspx

So I hope that, once this finally becomes reality (like it already is in ASP.NET vNext) then concerns like yours will fade away...

Yesssssssssss!!!

Dietrich
Sep 11, 2001

Boz0r posted:

I think it's going to be C#.

There really isn't a way to learn the entire .net framework in a week. Do you know Java at least?

Dietrich
Sep 11, 2001

I would check out the content at http://www.microsoftvirtualacademy.com/ to at least start getting your feet wet.

Dietrich
Sep 11, 2001

Boz0r posted:

I think it's going to be web service, WinForm and WPF.


I watched a video there but I found the hosts unbearable. Maybe I should give it another shot, though.

Oh, the hosts are terrible. Content is good though.

Dietrich
Sep 11, 2001

So my client has a solution with 121 projects in it, and through branching and merging the .sln file has developed some issues. Are there any tools out there that will analyze a .sln file and find problems?

The specific error we're getting is "Error parsing the nested project section in solution file."

Dietrich
Sep 11, 2001

ungh web development in vs 2015 is like learning a whole new tool set with Gulp and Bower.

Dietrich
Sep 11, 2001

Wow now I'm wondering if I should hold off on upgrading to windows 10.

Dietrich
Sep 11, 2001

Prefer self documenting code to well documented code.

code:
// get items to update
var l = q.Execute(a, b, c);

// loop through items
for(var x = 0; x < l.Length; x++)
{
 // set current status
 l[x].Status = d;
}
Will never be as easy to understand as

code:
var itemsToUpdate = getItemsFromOrder(customerId, clientId, ticketId);
for(var index = 0; index < itemsToUpdate.Length; index++)
{
  itemsToUpdate[index].Status = newStatus;
}
And when you're relying on comments to understand your code, you've got two things to maintain now rather than one.

Dietrich fucked around with this message at 14:44 on Jul 28, 2015

Dietrich
Sep 11, 2001

GrumpyDoctor posted:

Your second example has a bug :v:

dammit i just edited it.

Dietrich
Sep 11, 2001

Can't disagree more. One of the hardest things to design for with APIs is versioning and change control, and HATEOAS is a very elegant way to to deal with that.

Dietrich
Sep 11, 2001

crashdome posted:

Quick question: I'm in discussions about a new project that is a 24/7 windows service which grabs data from a web service and then communicates/displays that data on a standard WPF app. I am trying to convince the web service developers to send push-style notifications to my windows service for real-time updates. My question, though, is: if I cannot get the web service guys to hand out push-style notifications of updates, what is the best timer (or other way) to use in a Windows Service for interval updates that has long-term reliability as a priority?

Is it still System.Timers.Timer?

Ncron or Quartz.net will take care of scheduling jobs to be executed on a calendar or repeating basis. You could wire it all up with Timer, but there are lots of subtle gotchas you need to worry about.

As a bonus, NCron will even take care of the whole windows service install for you.

Dietrich fucked around with this message at 20:39 on Aug 11, 2015

Dietrich
Sep 11, 2001

epalm posted:

-Good stuff-

Also, make sure you use the console application template, and when you have it built, you just copy the .exe and .dlls to wherever, open a command prompt, and run ProgramName.exe install to have it install as a windows service.

https://code.google.com/p/ncron/wiki/Deployment

Dietrich
Sep 11, 2001

ljw1004 posted:

Are you sure about that? I thought that ASP.NET is free to arbitrarily terminate all left-over "dangling" things (both threads started with Task.Run, and async methods that have been kicked off) after the response has been delivered to the user.

There is instead a specific ASP.NET way to continue doing "background work" after the response has been given. But I can't remember what it's called.

This is absolutely true. While Task.Run will complete your action if the GC doesn't happen to be called during it's run, it may kill your action if the GC does happen to be called during your run.

There are lots of libraries to make this pretty simple though.

Dietrich
Sep 11, 2001

Ithaqua posted:

Can't you use QueueBackgroundWorkItem to ensure that it will run and not get GCed?

Yes, assuming the worker pool doesn't get recycled or something. Lots of the solutions you'll out there find include a persistence layer to ensure that the activity gets completed. I mean for a 2 second process you're probably fine with QueueBackgroundWorkItem, but you definitely want to plan for "what if it doesn't complete" with a cleanup job being ran periodically or something.

Dietrich
Sep 11, 2001

Baloogan posted:

yeh ive used the hell outta this, its still the Best In Class?

Pretty much.

Dietrich
Sep 11, 2001

Dapper.net for life.

Dietrich
Sep 11, 2001

code:
public interface IMyFancyQuery<TQuery, TResult> where TQuery : IQueryable<TResult>

Dietrich
Sep 11, 2001

Sab669 posted:

Do any of you guys use Visual SVN's sever tool? My boss asked me to look into it as we're upgrading all of our servers, but I've never managed a version control sever so I don't really have anything to compare its features to :shrug:

Reviews seem well and good, but we're a small company with 5 programmers supporting 3 main products so I don't know if any of it really matters to us.

USE GIT.

Dietrich
Sep 11, 2001

Git scales just fine for 99.999999999999% of software projects, teams, and companies.

Dietrich
Sep 11, 2001

Pilsner posted:

We've also used both TFS team stuff and TFS version control at work for a decade. I've never had much of a problem with either, but our project managers (aka. non-productive staff) always complained about a lack of overview in TFS team, until the past 1-2 years where MS has really put in some new features quickly and made it more modern.

I've also never had a problem with TFS version control; it's simple, reliable, and easy for new people to learn in 5 minutes, but alas, new hires have insisted and convinced management to switch everything to Git+GitFlow, so now everything is chaos (except on my little team, we stay on TFS). Not a day goes by where I don't hear my former co-workers be confused about how to do what in Git, and the branching madness. Oh well.

"Branching Madness"

Dietrich
Sep 11, 2001

If git is too confusing to you to switch from TFVC just use git and never branch anything, because even there it's vastly superior.

Dietrich
Sep 11, 2001

Pilsner posted:

How can you say the benefits always outweight the costs, no matter how great the costs?

It'd be pretty strange that 99% of modern development proceeds under git and microsoft is moving to git if it weren't better than svn or tfvc.

Dietrich
Sep 11, 2001

Sure, there's lots of companies out there that don't give two shits about being modern or using the best tools, but I don't think that's an effective argument against being modern or using the best tools. Living paycheck to paycheck and eating fast food all the time "works" for plenty of people as well.

Dietrich
Sep 11, 2001

Munkeymon posted:

Otherwise, Microsoft is embracing Git because it's popular and they realized (later than we'd all have liked!) that they can't just get people to use their products through sheer dint of being Microsoft.

Unpack this a bit.

Dietrich
Sep 11, 2001

Munkeymon posted:

Am I supposed to come to the realization that Git is popular because it's the best? Hell, it's not even the least bad DVCS.

I'm certainly not going to argue that TFS is better, but I would point out that TFS has features that some people see as requirements or just plain like, so I suppose you could say it has different strengths.

For the record, I'm not a big fan of TFS and you can look up a rant I went on in the horrors thread about a year ago for my complaints about it, but just because Microsoft is supporting it doesn't mean it's better, just that it's popular. Same as how Linux Subsystem for Windows isn't a sign they think Ubuntu is superior to Windows. Again, it's not even the least bad Linux, it's just popular.

When it comes to software that you didn't write and that you're going to be using to interact with other computers and people, popularity is incredibly important. If hg was the lingua franca of opensource then hg would be what we're talking about now. Basically, git is the best because it's popular.

Dietrich
Sep 11, 2001

Munkeymon posted:

Its popularity make it the best choice for Microsoft to throw resources behind and the best choice to learn if you've only got time to learn one VCS, yes, but those are not what most people mean when they hear "it's the best". Java is more popular than C#, so where's my VS Java integration?

(I actually am curious how hard it'd be to get Java to compile to MSIL or C# to JVM but apparently not curious enough to try to write a compiler, heh)

Your VS Java integration is being held up by Oracle being assholes.

Adbot
ADBOT LOVES YOU

Dietrich
Sep 11, 2001

Never update your Entity Framework's major version. Whatever you started with is what you should be using until the day you're prepared to re-write your data access layer.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply