Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

Christopher Duncan

@Christopher Duncan
About
Posts
8.9k
Topics
609
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Has anyone done a side loaded UWP application?
    C Christopher Duncan

    Yeah, Pete usually has his nose pointed in the right direction. If this is for general / semi-general public, I wonder if it would be worth putting it on the Windows store. I have no idea what hoops that involved, but it's meant for general distribution.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    The Lounge csharp visual-studio wpf com question

  • Has anyone done a side loaded UWP application?
    C Christopher Duncan

    Since the setup runs via Power Shell there's probably some path to pushing it through whatever admin voodoo that Windows IT guys do, but we only have it in half a dozen warehouses so no one has burned the cycles to figure out that sort of thing.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    The Lounge csharp visual-studio wpf com question

  • Has anyone done a side loaded UWP application?
    C Christopher Duncan

    I have a UWP app that we use in house. When I have a new version I put it up on a share and my tester copies it to the Surface Pro 4, right clicks on the setup app and runs with Power Shell. Usually that works fine, but there have been times when for reasons unknown we had to uninstall the existing version first and then install the new build before it would take. When we deem everything happy he then Remote Desktop's into the other Surfaces in various cities and repeats the process to take the version live. I haven't encountered any particular gotchas in terms of side loading, but we did get bit by Microsoft's bloody "We're gonna update Windows whenever we feel like it and you can't do anything about it" policy. I believe it was the Redstone 3 update, which jacked the networking on all of our boxes and burned us for a few days. But that's a Windows 10 thing, not specific to UWP. Overall it's been fun to work with.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    The Lounge csharp visual-studio wpf com question

  • So professional!
    C Christopher Duncan

    When I worked at Bell South they had a policy prohibiting the posting of Dilbert cartoons on the cubicle walls. Anything else was fine, just not Dilbert. I think that pretty much tells the whole story.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    The Lounge com help question

  • Passing table value params to Sql Server from WPF app
    C Christopher Duncan

    My bad. Looked like you were allocating a new SqlDataRecord each time but I'm in the US and thus still trying to get my eyes to focus this morning. Need. More. Coffee. :)

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    WPF database csharp asp-net sql-server visual-studio

  • Passing table value params to Sql Server from WPF app
    C Christopher Duncan

    Well, apparently the fingers are indeed fat. Tried again this morning and it worked without a fuss. Still using DataTable approach at this point. MS says SqlDataRecord is resource abusive and recommends not creating a new one but reusing a single instance. That aside, are there any benefits to the enumerable approach over populating a data table?

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    WPF database csharp asp-net sql-server visual-studio

  • Passing table value params to Sql Server from WPF app
    C Christopher Duncan

    That's a nice approach. The DataTable was from an example I found on TVPs. I was focused on making the db interaction worked and never thought to convert it to something more elegant. Deadlines and all that. I'm going to take another swing at this today. Hopefully I just fat fingered something when I cloned the MVC code I was using. Appreciate all the help.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    WPF database csharp asp-net sql-server visual-studio

  • Passing table value params to Sql Server from WPF app
    C Christopher Duncan

    Hey, Richard. Appreciate the feedback. Yeah, that was my take on it as well - ADO.NET should be ADO.NET. However, after a few decades of dealing with MS technologies, I never take that as gospel. When I get some time I'm going to try it again as the performance difference is significant, but I eyeballed the code pretty intensely and am as sure as I ever am about such things that it was the same in both environments. I hope to be wrong about that because otherwise I'm out of ideas. Do you use TVPs in your ADO.NET apps?

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    WPF database csharp asp-net sql-server visual-studio

  • Passing table value params to Sql Server from WPF app
    C Christopher Duncan

    For those familiar with them, TVPs are a great way to reduce the number of calls to the database and improve performance. I use them to great effect in the MVC web app using the general technique below. In the stored procedure I use a cursor to iterate through the rows and do all the db stuff in one whack. I copied the same routines to a WPF app I'm doing, however, and it flames out calling the proc. I've since deleted it and gone the multiple calls route so I don't remember the precise error message but in general it was barking about not liking the parameters. I'm on the same box, same version of VS, etc. and literally copied and pasted my routines. Works in MVC, no joy in WPF. Have any of you successfully used table value parameters in a WPF app, and if so, is there a trick I'm missing?

    DataTable tvp = new DataTable();
    tvp.Columns.Add(new DataColumn("Id", Type.GetType("System.Int32")));
    tvp.Columns.Add(new DataColumn("RowIdx", Type.GetType("System.Int32")));
    tvp.Columns.Add(new DataColumn("ParentId", Type.GetType("System.Int32")));
    tvp.Columns.Add(new DataColumn("MemberId", Type.GetType("System.Int32")));

    DataRow row = null;
    int iRowIdx = 0;

    foreach (int iId in Ids)
    {
    row = tvp.NewRow();
    row["Id"] = 0;
    row["RowIdx"] = iRowIdx++;
    row["ParentId"] = iListId;
    row["MemberId"] = iId;
    tvp.Rows.Add(row);
    }
    ...
    Command.Parameters.AddWithValue("@Entries", tvp);
    ...
    ExecuteNonQuery(), etc.

    Thanks!

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    WPF database csharp asp-net sql-server visual-studio

  • I am such a fanboy
    C Christopher Duncan

    Yeah, can buy expensive top end boxes for stuff but to a large degree the performance gains versus money you spend diminishes rapidly. I have recording studio, dev and video production boxes running old Dell Precision T3500s with single Xeon 3.2 ghz processor that I bought refurbished for $250. Bumped them up to the max of 24 gig memory, added expensive video cards where needed, some SSDs for boot & scratch and they do a great job for far less than I'd pay for newer boxes with more horsepower. I might get a little extra speed buying latest and greatest, but I'd be paying a heckuva lot more money. I'm big on best bang for the buck solutions.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    The Lounge

  • Shameless woot!
    C Christopher Duncan

    Congrats, man! Writing a book is like hitting yourself in the kneecap with a hammer. It feels so good when you're done. :-D

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    The Lounge learning python com

  • I am such a fanboy
    C Christopher Duncan

    Actually, I've been told that I was one of the simpler things in life.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid The Career Programmer

    The Lounge

  • I am such a fanboy
    C Christopher Duncan

    I'm feeling positively ancient with my iPhone 6 (the smaller one that fits my 5 cases), but it still does everything I need. And I'm writing this on a Dell laptop that I bought over a decade ago, running Windows 7. Honestly, I think I should consider therapy to see if they can cure my loss of desire to try bright and shiny things. Maybe there's a pill I could take. Do they make a Tryagra?

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid: How to Make a Living with Your Creativity The Career Programmer

    The Lounge

  • My publisher is looking for authors to write big data (Hadoop, etc.) books
    C Christopher Duncan

    Yeah, there's different motivations for writing and as you well know, a book is a heckuva lot of work. Of course, what they don't tell you in the beginning is that's when it's published, the work has just begun. :-D

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid: How to Make a Living with Your Creativity The Career Programmer

    The Lounge com business sales tutorial learning

  • My publisher is looking for authors to write big data (Hadoop, etc.) books
    C Christopher Duncan

    That's an option these days, and one I considered for my own work. However, it would cost me thousands of dollars to hire the professional editors, compositors, artists and other talent to insure a professional quality title. Working with a publisher, I get those services for free. And of course, any author who feels that he shouldn't have to participate in the marketing and promotion of his work won't have much fun in the world of self publishing. There are benefits to self publishing and to working with an established publisher. I looked at both and went the approach that would serve me best. That said, there is no path that doesn't involve the author being actively engaged in promotion. Have you had good experiences self publishing your own books?

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid: How to Make a Living with Your Creativity The Career Programmer

    The Lounge com business sales tutorial learning

  • My publisher is looking for authors to write big data (Hadoop, etc.) books
    C Christopher Duncan

    I've always enjoyed a great relationship with my publisher and they treat me quite well. You'll find that the root of most artistic complaints (and not just in writing) is unrealistic expectations. Creative people expect that they shouldn't have to do anything but create and then sit back and let everyone else do all the work of gemerating revenue. They're also shocked when businesses act like for-profit entities. Not surprisingly,when you approach the world with such expectations, you'll suffer a never ending stream of disappointments. Whether it's books, music, film, dance, graphics or any other creative endeavor, if you want to make a full or part time living at it, you have to understand and embrace the business side of things. Wishful thinking is not an effective strategy. In fact, that's why I wrote Have Fun, Get Paid, to help those who really do want to help themselves. 95% of creatives will run screaming in the opposite direction and continue to search for a "somethiing for nothing" lifestyle. The other 5% will enjoy success, and will also have a much more positive relationship with their industry.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid: How to Make a Living with Your Creativity The Career Programmer

    The Lounge com business sales tutorial learning

  • My publisher is looking for authors to write big data (Hadoop, etc.) books
    C Christopher Duncan

    Hey, guys. My editor pinged me yesterday to say he's looking for big data authors. If you're interested, go to my website's contact form[^] and ping me so that I can make an email introduction for you. If I know you, I'll share my impressions with him. If I don't, I'll be honest with him that you're a blind referral. As far as he goes, of all the editors I've worked with over the years, he's my absolute favorite. Honest, positive, constructive and a good guy. He helped me make both Tribes 2nd ed and Have Fun much better books without getting in my way or stepping on my creative toes. I would recommend him without hesitation. If you've never written a book before, be advised that you need to be prepared to do your own marketing and promotion once it hits the streets if you want more people than your family and friends to read it. Your publisher (mine and any other) will do very, very little for you in that regard. That's just the nature of the business. You can waste time and emotion ranting about how that's not fair, or you can embrace reality and operate accordingly. It is what it is. Consequently, publishers are most enthusiastic about authors who have a firm grasp of their audience and are both willing and able to get in front of them and spread the word once the book has been released - in other words, authors who are capable of effective marketing and promotion. If you're not comfortable with doing that, don't write books. It's a lot of work (takes a year or so to get it on the street) and it won't be rewarding for you if it dies a quiet death once it's available for sale. With that in mind, here are his comments to me. If you're interested in writing for Apress, I'll be happy to hook you up.

    I’m now doing big data books—both specific technologies like Hadoop and as it relates to sectors like healthcare or finance—so feel free to pass my name along to any developer friend working in that area.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid: How to Make a Living with Your Creativity

    The Lounge com business sales tutorial learning

  • Net Neutrality
    C Christopher Duncan

    Fred Flams wrote:

    the neutrality of the Net should also include the liberty of speech and thought that every citizen of the world should enjoy

    I admire the thinking, but this is a common mistake that a lot of folks in my country also make (your profile says you live in France). I often hear and read things talking about how some local, regional or national issue should be handled in some part of the world outside of America, based on freedom of speech, life, liberty, etc. I have to remind them that while our country was built on a constitution that codified ideals such as personal freedoms and rights, it was at the time a novel concept and certainly not a globally held set of principles. Even today, when many countries consider human rights and democratic representation to be the right way of doing things, it's most certainly not a globally held set of ideals. Not only do governments vary wildly, this is often a reflection of the fact that cultures and thier views on religion, ethics, individuality versus personal freedom, etc. are very different in other parts of the world. In other words, when people talk about the fact that someone in, say, China, is having their rights abused, I have to gently remind them that they don't have the same rights that we enjoy. They don't live in America. Or, in your case, France. The Internet is global. Liberty of speech and thought is not. You can try to make it that way if you like, but I can assure you that you'll need a lot of guns and tanks in order to do so.

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid: How to Make a Living with Your Creativity The Career Programmer

    The Lounge question com business help tutorial

  • Potentially NSFW - Comments from a certain adult entertainment site on stock photos
    C Christopher Duncan

    On behalf of kid sisters everywhere, I'd like to thank you for venturing forth to check that out for us. It's a dirty job (from the sounds of it), but someone has to do it. :-D

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid: How to Make a Living with Your Creativity The Career Programmer

    The Lounge com

  • Why Is Everybody Hating Justin Bieber
    C Christopher Duncan

    He was the model for those silhouette targets you like so much. :-D

    Christopher Duncan Author of Unite the Tribes: Leadership Skills for Technology Managers Have Fun, Get Paid: How to Make a Living with Your Creativity The Career Programmer

    The Lounge json
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups