« first day (1592 days earlier)      last day (2557 days later) » 

7:45 AM
posted on February 24, 2017

One of the more tedious and thankless tasks in mobile development is the management of bitmaps. Each platform has its own naming convention and its own set of supported scales. If you want your bitmaps to appear crisp on a wide array of devices, you’ll soon be managing a dozen or so copies of each bitmap. This can quickly lead to frustration and mistakes that are difficult to catch (and it may

 
 
2 hours later…
9:18 AM
I just logged in to Azure to see all my services gone ... after a minute of solid panic I see I was logged into a different account.
 
wow that must have been nerve-wracking
 
It wasn't a pleasant feeling. I'm now considering if I should have a non-Azure backup of my databases. :P
 
 
3 hours later…
12:48 PM
Morning
 
 
1 hour later…
2:13 PM
waves
 
Hi Lynn
 
2:32 PM
In WPF, is it possible to put a PDF user guide in the application and let the user click a button to open it? I'm looking at this and wondering if the user guide should be on the network or within the app somehow: stackoverflow.com/a/5215875/177416
 
I think your best bet is to extract it and then run it as a shell command. I doubt many readers will play nice with embedded resources.
 
Hmm. If it's on the network, using a HyperLink should open the PDF
Though this will work for a file as well: System.Diagnostics.Process.Start(@"c:\document.pdf");
 
2:49 PM
internal static class ResultExt
{
    internal static bool IsEither(this Result result, Result first, Result other) => result == first || result == other;
}
Is ^ correct english?
 
Hi Johan
 
hej alex
 
Sounds correct here
 
thanks
 
You're welcome!
Been using extension methods. They're really cool
 
2:53 PM
Use them with care
They are nice but can definitely be overused
 
Mostly for mapping VMs <--> models
 
Adding extensions for things such as string & object can be a smell
 
We throw a .Select(x => x.ToMyVm())
 
I often find it that the code reads better with static invocations
But easier to write with extensions
 
And makes life easier by just calling the extension method to map the model to the VM
And we've got a few extensions for the HTML helpers in MVC
It's tempting to write a bunch of them on all sorts of things, but not good practice
 
2:57 PM
I sometimes use extension methods with interfaces to provide some default methods. I'm sure it's not a great idea, but it's very handy.
 
It can be nice.
I once wrote extension methods for a typed null :D
Was a dumb optimization
 
Heh
Nothing worse than looking at code you wrote just a year ago. It's kinda amazing how much you move in such a short time really.
 
yeah, both good and bad
there is also the aspect that there is usually a reason you read old code and the reason is that it is broken
So perhaps more likely that we revisit the worst parts
 
Yup, my implementation of MVVM was smelly... I instantiated views in VMs
 
Not so often anyone whips up the editor on a friday night for recreational reading of old code.
 
3:10 PM
Speak for yourself! My old code is like a fancy piece of abstract art.
 
@JohanLarsson how easy would be an implementation of something like a block diagram editor? With components that you drag around and connect with each other?
 
Edge-Edge connect or with a line between?
 
depending on your complexity requirements, the dragablz package might do what you need
 
@WilliamMariager not sure what you mean
 
@milleniumbug Top is edge-edge connecting, bottom is with a line between. i.imgur.com/S9cocT3.png
 
3:22 PM
@WilliamMariager the latter
 
Ah. In that case I think it should be trivial. First would require a bit of snap detection, although not exactly rocket science either.
 
@milleniumbug Dunno but I'm sure you can do it. Do you have an mspaint mockup?
 
@JohanLarsson Not yet, let me get near a PC first
 
maybe powerpoint is better
 
(that will take around 30-40 min)
 
3:28 PM
no rush
Analyzer question: as of now we treat all method calls from third party returning IDisposableas if they create the disposable.
I'm thinking about changing it so that generic methods are assumed to not create.
 
In the worst case I'll draw them on the canvas and detect mouse clicks and drags
 
There is some hack dragging in the demo project for this
 
I saw an Rx drag and drop example. I was blown away.
 
Probably not very useful for anything
 
@JohanLarsson Will be helpful if I take the "manual everything" approach
 
4:04 PM
I hate technology. :P I just started implementing a proper RESTful service instead of WCF. And now I'm learning about GraphQL which just seems even better!
 
@JohanLarsson mockup
 
Has anyone done an MVC app where they mix forms with Windows authentication? Just wondering if it's possible. From some research, it seems it's possible: stackoverflow.com/questions/2250921/…
 
4:22 PM
@JohanLarsson why
also: generic as in T Create<T>() { /* ... */ } /* ... */ var file = Create<File>();?
 
@milleniumbug looks hard
 
@Julien yeah, implementing everything while also providing enough usability is difficult enough, so I was wondering whether someone at least has implemented a ready-made draggable components so at least I wouldn't need to deal with dragging, resizing, scrolling and like
 
also, some sort of canvas so you can place the elements? how do you deal with collisions
 
yeah would need z-index tracking
I have a bad feeling about this
 
lol. get out now while you still can
 
4:42 PM
I'd assume this would be a month to create a prototype, and continuous improvements would take quite a long time over that
that's also disregarding integration with everything else
 
4:54 PM
and disregarding look and feel
 
doesnt sound unreasonable
 
5:44 PM
@milleniumbug ask @ReedCopsey .. one component of his product is this
direct customer to local MS Visio rep.
write a stencil pack, sell that instead. dun
 
@milleniumbug I really recommend Mindscape's stuff for that, if your budget allows
it's pretty awesome - we're using it (heavily, heavily customized)
 
That looks amazing, Reed. It's like Visio inside WPF
 
it's nice - we have it super heavily customized - it's definitely not trivial to completely change it, but it is very flexib le
and Mindscape does a good job (best I've seen in commercial vendors) at making their stuff MVVM friendly and flexible
can see how we've tweaked it here if you're interested facebook.com/pg/CTechSoftware/videos
(i'd make the video 1080p and mute it though 😋 )
 
6:01 PM
Years ago, I got a free license for Telerik ASP.NET stuff and loved it. We had no budget to buy them, so asked and they said yes
 
@ReedCopsey turns off monitor and puts volume to 100
s/puts/sets
 
@ReedCopsey very impressive
 
millenium you should just hire Reed if your budget allows
 
well I definitely won't have budget for that
 
i hear he takes payments in bacon and long walks on the beach
 
6:06 PM
the entire thingy is supposed to be a "student group project" so they'll get whatever the uni will pay us for :D
but with me estimating this thing to be quite difficult I think I'll choose a different subject to make a group project of
 
hahaha, that's not me, btw 😀
@milleniumbug Doing diagramming stuff is actually pretty tough - I've written my own before
but then dropped it and went commercial
it's just a lot of bookkeeping involved 😉
 
Reed, what do you mean, bookkeeping?
isn't that... an accountants job?
 
@ReedCopsey yeah, I'm quite aware that this is tough, I'm just trying to imagine how more tough can this be
 
@milleniumbug I think it is a better guess than to assume they are created.
 
@milleniumbug was tough enough when I did it I abandoned my version 😉
but it also depends a lot on requirements
 
6:16 PM
I could perhaps check constraints and see if there is a T : new() or T : SomeType
 
@Johan Or if the returned disposable is, itself, generic
(the actual type, if you can find it)
 
@milleniumbug means you will write an open source lib for it!
 
there are a couple out there @milleniumbug
 
@ReedCopsey yeah, I need to do some tuning
 
6:18 PM
PR it to Gu.Wpf.Geometry :)
 
In a WPF project, I've got these tabs: imgur.com/a/wGKDa
Thinking of adding a button for help where the red box is
Is it possible to "float" an item to the right in WPF?
 
is it the drug app or a new app?
 
@ReedCopsey thanks, definitely will consider this option if we choose this group project subject
 
Drug app
 
6:24 PM
@alex anything visual is possible ;)
 
:)
 
if you know the tabs won't fill the space, you can always put them in the same container (ie: make a grid to hold the tabcontrol)
 
one way you can float it is to put a grid above the rest and add the button to it
 
just make a grid that's 2 column, and make the tabcontrol ColumnSpan=2
and the button in Column=1
 
maybe not so elegant and make sure the background is null :)
 
6:25 PM
Hmm. Another question: is that a good spot for help?
 
i'd say yes. fairly standard
 
OK. Let me try it out
 
yeah, a questionmark there feels like a standard help button
 
Had to look up the syntax for null background: {x:Null}
Used it before for something
 
it is the default
it means it is not hit test visible
 
6:27 PM
Oh, that makes sense
 
don't think a grid steals clicks any way
if you have a borderless window you could add the help button next to the close & minimize guys
 
The layout is a little trickier... There's a border > dockpanel (I know it's evil!) > TextBlock + TextBlock (only shown when in dev; one docked to top, the other to bottom) > TabControl (no docking so it fills the remaining space between the two textblocks)
 
dockpanel isnt evil
whats your beef
 
Someone here said it was awhile back
I've got no issues with it. Saved my bacon on this layout
 
@JohanLarsson read that as "don't think a girl steals chicks any way"
 
6:36 PM
Hehehe!
 
@Kevin we have an idiom in Polish for that which translates to "a hungry man always has a bread in mind"
 
Read into that what you wish ;)
 
you speak Polish?!
holy crap
 
No, but it somehow sounded familiar!
 
6:41 PM
ich dodamo spatch
 
not only I speak Polish, I am Polish
 
well i go in and out of phases trying to learn Polish on duolingo
not always the easiest. hah.
 
have fun :3 polish word inflection is hell incarnate
 
i need a polish friend haha. i should check meetup
one of my best friends is engaged to a polish native... he's learning quite well.
looking forward to their polish wedding
(I'm 25% polish)
 
fuck yeah, weddings
depending on your friends, you may want to prepare your liver :D
 
6:56 PM
Is it possible to launch a PDF from a button? I know a HyperLink will do the trick
 
@Alex yeah, launch a Process
@milleniumbug "there will be a bottle of polish vodka at every table" is what I've been told. I'm also a groomsman, so i don't know what that means for me... i'll prepare.
 
7:38 PM
@Alex Like I mentioned, shell execute is the obvious choice. Opens it up with whatever is installed.
 
may want to check if there is a default pdf viewer installed first though.
 
Yep, got a Button with a command attached
Then calling the Process.Start(....)
It seems to be working well
@Kevin Good point. But the one user (!) for the app has Acrobat
 
In any case, they'll just be presented with a choice and some suggestions per Windows default if they don't.
Then they'll bug support, and support will tell them to install a reader of some kind.
 
Yep
Hey, the user just asked how to add another person to the app!
Not sure if the app can handle two users at the same time!!!
 
Whoa! Multiple users!
 
7:53 PM
I know
 
Just got the Notable Question badge on a two year old question. :P
 
Nice! Which question?
 
0
Q: LG W3000H Native Resolution

William MariagerI just bought an LG W3000H because of the listed 2560x1600 resolution, however, upon hooking it up, I see it only has a 1280x800 native resolution. The specs for the monitor doesn't mention a lower native resolution. Is this simply a marketing scheme, that they don't even list the native resoluti...

Actually, the question itself is 6 years old :P
I looked at activity. :P
From back when I got my awesome screen. :P I guess that's right about when you upgraded to your trusty new CRTs? ;)
 
Yeah, we're only about 15 years behind here.
The bathrooms are about 60 years behind
 
Well, at least I hear the railroad will reach you in a few years!
 
7:58 PM
I like that! Need to use that line here
President Lincoln will come for the opening of our train station then
So did you ever get that display working right?
The comments made it look like you never got the full res on that
 
I got it working, I was using an old cable.
 
Great
 
Never knew that there were multiple types of DVI cables and it turns out there are five kinds.
@Alex Even your time is outdated ...
 
:)
Invented a time machine back in the 1860's
Decided to come and live in this age
 
@WilliamMariager :D
 
8:01 PM
@Alex Decided to bring your monitors too.
 
Nah, been skipping around the space/time continuum. Found these used one here. They don't interfere with the flux capacitor. The newer displays do
 
Oh yeah, sure sure
You know when your employer screws up your paycheck and it's really annoying?
It's even more annoying when you're your own employer and you literally only have yourself to blame ...
 
8:20 PM
I really wish there were more people in the UX chat.
 
@JohanLarsson We're getting those next week in the office ;)
 
Along with the ADSL?
Or was it ISDN?
 
"ADSL?!" they'll ask me. "What in blazes do you need to do, boy??"
"Dialup is good enough for ya"
 
Assume your boss has a mustache and a bowler hat?
 
Yep. How did you know?
 
8:31 PM
Educated guess ...
 
 
2 hours later…
10:43 PM
So.. for anyone else using Subversion...
 
10:55 PM
Ouch.
 
11:12 PM
Git's not immune either, @LynnCrumbling - great read on it stackoverflow.com/questions/9392365/…
the answer there is epic
 
11:25 PM
@ReedCopsey Thanks!
Wow... just as catastrophic
 

« first day (1592 days earlier)      last day (2557 days later) »