« first day (1570 days earlier)      last day (3604 days later) » 

17:00
@paul but I can schedule a backup manually or through my application (winform0
Someone still has to remember to do it every day and keep numerous copies of it
yes, you could. I only mention it as it's probably the most important omission (for me, anyway)
You can do that, but the person in the hotel might need to learn that.
I feel like going full retard on a thing.
@JohanLarsson every day i got the same feeling once or twice, if that make you feel better :)
17:03
:)
I'm gonna take pragmatism and just stomp it into the ground.
Downside is that it will require T4
How is that a downside? :)
anyway my other question
Entity Framework 6 (code first or database first) ?
@Tommo1977 I vote DB first :D
I like database first, but I think code first is probably easier if you want managed migrations
DB first +1, especially if you are really harsh on performance
17:09
right
@KendallFrey I suck at it.
namespace FullRetard
{
	<#
	for (int i = 0; i < 256; i++)
	{
	#>
    public class DB// I want i here
    {
    }
  <# } #>
}
What is a clean way to do ^ ?
@Tommo1977 code first... MS is moving away from db first anyway
#{i}
O_O
@CharlieBrown Everyone else said db first
17:11
@tweray dbfirst and code first have the same performance
absolutely zero reason to prefer db first for new development
@paul prints 'public class DB#{i}'
@CharlieBrown Why/to what extent?
I find code first to be god awful
code first has none of the disadvantages of dbfirst, the real question is "why use db first?"
@CharlieBrown i'm talking about performance on db side only, better table structure really matters a lot imo
Disadvantages like what?
17:13
@paul DB<#= i #> worked
@Johan That's how my T4 looks, maybe try <#= i #>
@TravisJ - Drop shadows always remind me of 90's web design
@Sippy so, you dislike writing c# classes? and letting EF take care of the rest?
@CharlieBrown I dislike code first EF.
@tweray what?!? that makes no sense
17:14
I prefer designing a database in a database designer
Where I can see it
As a former DBA, I like specifying my schema absolutely explicity
you can achieve the exact same in schema in both approaches
I can't mentally visualise a database whilst looking at code
I didn't say you can't
ugh, thats the point.
@CharlieBrown when doing code first, it's not very transparent about how your schema will look like
17:14
The database is going the way of the dodo bird
@tweray its extremely transparent
and, i would argue, makes way more sense
Also, I don't like the way code first handles many-many, or the way it names tables
Applications have information that needs to be persisted... why would you care 'how' it happens, so long as its performant, and easy to do?
How does EF code first handle many-to-many?
it handles it the exact same way dbfirst does, same mapping
@CharlieBrown You say easy to do ..
I find code first to be non intuitive and difficult to use
17:16
@CharlieBrown well, when it's about relation and huge amount of data, you have to care about it...
And how would that be? haha I haven't used EF.
I still use nHibernate
@Spencer it creates a link table without asking, and gives it a silly name
the underlying mechanism of dbfirst and code first is identical, it uses the same code
It takes me a lot longer to fix stuff in my schema that's wrong using code first than it does by actually looking at the database in SMS
@paul - Ah gotcha.
17:17
@CharlieBrown again not the point
i feel like the problem might, rtfm
Well .. no
posted on February 02, 2015 by Visual Studio Blog

Even though we recently released an update to the Visual Studio Tools for Apache Cordova, we are already busy working on the next series of improvements to help you more easily build Android, iOS, and Windows apps. For an upcoming release, one of the areas we are looking to improve is the overall experience around installing the tools and using them for the first time to build a new Cordova pro

uhh, I think I failed
Lol
17:18
when you create a model in dbfirst, it just generates a code first model in the generated cs files
here is a fun one in dbfirst... have 3 developers change the model and check into tfs at the same time
@CharlieBrown well even your data structure is extremely typical and simple related, you still have to worry about indexes and concurrencies
Your examples are weird today. That's a quirk of TFS .. you can do that with anything generated.
What would be the simplest approach to build a Queue of Files?
List<File> listOfFiles
Then play FILO :D
I wanted to create a fluent interface for writing the string DB110.DBX0.0. Think the last .0 makes it hard a 0 is not a valid property name.
17:21
No ..
FIFO?
That is what I was thinking, iterate the directory once then use that same list.
@tweray EF handles concurrency for you, and you can define indexes by using a mapping file, or using attributes
On Windows it's easy cos you get quite powerful directory tools
Just use that
@Greg System.IO.Directory.GetFiles(path, "*" + fileType, SearchOption.TopDirectoryOnly).ToList();
@CharlieBrown but yes, i see your point, maybe i should change my thesis, i mean, if you have complicated relations and really harsh performance requirement, just avoid using EF
@Sippy Yeah, I basically have that, wasn't sure if there was a better way.
17:23
Not that I know.
Works on network drives though. :D
@tweray agreed. but i have successfully used it with an application that reads thermal images from high speed cameras and saves the byte streams to sql express
@CharlieBrown Does it ever* make any sense to have an action in a controller use void?
Going round in circles in my head
sure, it just returns 200 OK
Alright
@CharlieBrown yes, upon simple data structure EF is perfect, that's why i feel it will just rocks with document-drive database
17:26
I have heard relational databases are on their way out for some time now.
Carrying on
I will have to get used to code first at some point but for now I dislike it
Just don't find it nice to use
Sorry guys, seem to have hit a few nerves here
Nah you haven't
It wasn't an argument, I was just trying to get information out of @Charlie :)
just regular discussion, it happens in my office 4-5 times a day
Cool
I'm used to working with classes, getting data from database etc or user input
With entity framework can I use my models similar manner
@tweray When you write mappers
Do you have to explicitly define them both ways?
In automapper this is
17:29
Or should I be keeping EntityFramework models separate from my other classes ?
@Sippy that's really depending, we have db model, business model, and view model
I mean like
Domainmodel -> View Model
@tweray you think I should have db model
If I do that, will it also work the other way
Or do I need to define it as well?
@Sippy not as far as i know, it is one sided, you have to define them in both way
17:30
Okey thanks
I was thinking of using entity framework and having a class library called DataClasses
Anyone have any Angular / Kendo experience?
@SpencerRuport @Squiggle does, not sure if he's here
Got a fiddle I can't get to work D:
@Tommo1977 well that's very depending, if you use that webapi just for database access purpose, then you can just have 1 level of model, or even easier, just use odata
17:32
@Squiggle - You around?
@tweray I have this diagram courtesy of @CharlieBrown
basically the windows service and web api would need to access the database some how
@CharlieBrown Well this is way sodding easier than using AJAX for stuff
much doh
user3079266
hey guys. Can I ask a quick question?
So, should I have DataModel, BusinessModel, ViewModel etc (remember this is winform app) with WebAPI and Windows Service
17:38
I hate it when there's a piece of sand or something on the mouse and I can't find it to wipe it off.
but i can feel it when i use the mouse
datamodel, viewmodels
i take that back, business model and view models. your business models are your data models
Should they both be in the DomainModel class library dll I assume ?
unless the Services next to EF have a lot complicated business rules, i don't see too many requirement to add one extra level of model
17:40
Btw @Charlie I couldn't get the MSSQL licensing site to work
What is the going rate for them atm?
user3079266
Erm... Hello? Can anybody tall me if I can safely return a lambda from a function? I.e.

Func<int,int> fn(){return (int a) => {int b = 0; return b;}; }

I think that should work if the lambdas are allocated on the heap... but are they?
@Sippy first born childs right arm
@CharlieBrown Pahaha
@Mints97 try it out in linqpad or dotnetfiddle
@CharlieBrown @tweray If a BusinessModel is very similar to the ViewModel what do you do ? Use BusinessModel for the view or use AutoMapper ?
And
17:43
Is there a hack to make either a) 0 a valid property name b) 0.0 a valid property name?
Must work with intellisense
Should the Winform App only see the ViewModels I assume
@Tommo1977 in a perfect world, yes
@JohanLarsson inb4 you actually become insane ...
too late
@JohanLarsson No
unless you switch to JS
17:44
@Tommo1977 then that's up to your call, usually it only matters if there are some info in the business model that you don't want to expose to the client, of course having viewmodel and do automapper is quite a typical and safe way, and also doesn't cause too much extra effort
I'm afraid to ask why you would make such a question...
public Address \u0030 { get {... compiles
but does not show up in intellisense
@JohanLarsson are you just douchecoding or do you have an actual need?
2
@tweray ok thanks
@TomW I'm being anti-pragmatic
17:45
@Tommo1977 np
Trying to create a fluent interface for generating an address like: "DB110.DBX0.0"
There are three things that you could reasonably use the member name `0.0` to represent:
- `0F`
- `0M`
#Compiletime
And they're already literals
@tweray Just to clarify, my Entity Framework code will be where ? I need to keep DomainModel class library dll just to contain the POCO type classes :/
17:48
0D also
EF code should go in its own project
@CharlieBrown What about if I'm passing a class in a WebAPI call from my winform app. Should I be passing a BusinessModel ?
Hotels.Data
Hotels.Domain
Hotels.Services
Hotels.Win
Hotels.Scheduler
Hotels.WebApi
@CharlieBrown but my data classes are within this project
@TomW Lol is Douchecoding an actual thing?
17:51
Thats where I would start anyway
@Sippy it what u do all day lol
in data is EntityFramework code only
@CharlieBrown What's your scheduler for?
@TomW wow.
Scheduler => windows service to schedule 3rd party downloads
Data is your EF context, it references Domain, Services
Domain is your models, it references NOTHING
@CharlieBrown I feel dumb not knowing what that's for.
17:52
I would recommend first developing it as a simple console app
Services is your Business logic services, it references Domain, and exposes an IDataContext
Does IIS not handle download scheduling?
Win -> windows App, references Domain, Data, Services
And then once you get it working convert it to a windows service.
@Sippy douchecoding = deliberately making code confusing, unpredictable or just generally bad
Being a douche with one's coding
17:53
Urban that shit :P
!!urban douchecoding
@SpencerRuport No definition found for douchecoding
Can you convert DirectoryInfo into a string[]?
Rather, FileInfo[] to string[]
@Greg C# is Turing-complete so...yes.
I just imagine @JohanLarsson sitting there laughing maniacally to himself as code 'anti-pragmatic' nonsense :P
17:54
anyone want to test a node app for me? you would need to clone it from github, and run it from command line
The string returned by the ToString method represents path that was passed to the constructor. When you create a FileInfo object using the constructors, the ToString method returns the fully qualified path. However, there are cases where the string returned by the ToString method does not represent the fully qualified path. For example, when you create a FileInfo object using the GetFiles method, the ToString method does not represent the fully qualified path.
That is all MSDN tells me about it.
@Greg do you mean concisely?
here is the stuck.
@TomW So you made it up
@TomW I grabbed a list via DirectoryInfo, now I have a FileInfo[] as it grabbed the files. What I'd like to do now, convert it, into a string[].
17:56
@Greg string[] of what?
@Sippy I took the initiative in improving the local vernacular
Of Directory.GetFiles
Yeah but what information do you want in it?
GetFiles returns File objects
IIRC FileInfo can represent a file whose path is invalid on that system
You want the data within the files themselves?
17:57
var files = new DirectoryInfo(server.Path).GetFiles("sitemap*.*);
Also realise that 'valid' and 'exists' are not the same thing at all
for (int j = 0; j < 8; j++)
{
#>
		    public static Address.Fragment DBX<#= j #>
            {
                get { return new Address.Fragment(<#= i #>, <#= j #>);}
            }
<# } #>
    }
<# } #>
}
Lol
#########
var compressed = Directory.GetFiles(server.Path, "sitemap*.gz", SearchOption.TopDirectoryOnly);
@Sippy What should be done better? I know very little T4
@JohanLarsson Fuck knows I just found it amusing to look at :D
17:58
I have a method that will take a string[] to attempt to delete those files. I want to make sure files can be correctly put into it.
uhh
@Sippy ok it does the job and small enough to not be a huge problem
@CharlieBrown cheers
@Tommo1977 now does sound like a good time for a beer
Example: FileManager.PurgeFilesOnServer(system, compressed);
17:59
sure does
@SpencerRuport - So you aren't a fan of dropshadow?
;)
quickly lol
@Greg FileInfo isn't the right representation to be able to do that; are you performing some suitable logic to triage whether or not you actually can delete the file represented by each FileInfo?
For my domain models I have data, view, you think I don;t need busines
Just converting them won't work. FileInfos can represent files that don't exist or aren't accessible
18:00
@TomW Yeah, I check it exist before I attempt to delete.
For example a user logs into the system I have username, password, should I have a class to represent this
@TomW But, how do you make sure FileInfo can be converted to a valid string[] for it.,
or would that be in the viewmodel maybe i suppose
for both request/responses
18:01
That's what I've been referring to
Maybe that'll help
SiteBackup just has some basic file info like the path, name and contained data
@Tommo1977 for user/pass you can just Service.IsAuthorized(user, pwd) but for methods with many params that are NOT domain model.. ugh, wait one
@Sippy Doesn't help, I had to use DirectoryInfo and FileInfo because I had to do compression. Otherwise the other areas I use the normal approach you did to get the files.
@Greg wait, what? Directory.GetFiles returns string[]. What's wrong with that?
@CharlieBrown yes that is what i mean
Guess I could do DBX0_0 but huge meh
18:03
@TomW That is what I account for, however one spot I have to return a FileInfo[] so I can compress them.
Gonna wait for a PR :)
Service.IsAuthorized(string usr, string pwd)
Service.CreateNewUser(Models.User)
Service.MakeMeACutePony(Services.CutePonyRequest)
@JohanLarsson write your own scripting language that accepts the desired syntax and then CodeDom or Roslyn :)
tempting :)
 files.Select(f => f.FullName).ToArray()
That might work
18:05
Service.MakeMeACutePony(Services.CutePonyRequest) ?
thats the case where CutePonyRequest isnt a domain model, but its complex enough that if you passed it as params, it would be nuts
More precisely: files.Select(f => Path.Combine(server.Path, f.FullName)).ToArray()
@CharlieBrown So you mean I'd define a class in the services dll ?
dont think i'm following
yeah
thats a 'business model'
right
got ya
Domain model will have just data and view
18:07
but not one that goes into the database
anything else needed in services (like business model)
viewmodels go into your windows app project, since they are specifc to the view /form itself
services usually has stuff like logging, error handling, stuff you dont want to repeat for each application/client
right but if my viewmodels are in my windows app, that means I'd expose my datamodel or business model to this app ?
I thought all classes for data and view would be in my Hotels.Domain class library
data in models
viewmodels in windows app
windows app references Hotels.DOmain
ok and use automapper to map data model to viewmodel
18:11
@Tommo1977 sorry was afk... i mean not really afk but somehow not in chat... anyways @CharlieBrown is rocking with you which is even better :)
@Tommo1977 yes, if needed. sometimes you dont need automaps
@TravisJ - I'm not saying I hate it, I just think it's difficult to get right. If you can look retro without looking outdated I think it'd be cool to bring the style back
for CRUD based apps, you usually do
@CharlieBrown sorry I gotta leave now,
18:27
Kendo datasources are not intuitive at all.
$(element).data("kendoGrid").dataSource.add(item);
$(element).data("kendoGrid").dataSource.read();
$(element).data("kendoGrid").refresh();
That code does nothing.
Not even an error.
@SpencerRuport - do you have an email? I can email you the way the whole feature looks if you are curious
I can't look at it now but [email protected]
k
@SpencerRuport - I sent a link to imgur
cool
I'll take a look tonight
I've never had a lot of success with automapper, especially when using it with HL7 -> custom C# POCO's
18:40
@TravisJ - Can you look at this fiddle and tell me why the kendo grid won't add an item?
hi any one can tel me how to post an image by web request to another website like ebay product upload page please?
With their API
Its not magic
i dont know about the api
but i need to upload an image on ebay product upload page
Well, then it will be awfully difficult to talk to their site
but dude i need it i used various examples and code but not succeed
plg tell me how can i proceed for it if u have any idea
i was searching from last some days but i didn't find the way
18:55
You could proceed by looking up the eBay API, getting an API key, etc.
Its not just a "do X" kind of thing
i tried for API on ebay developer point but how can i know which api i use
@SpencerRuport - You want the long or the short version?
i need short version
How would you not know which API you are using? But aside from that, my comment was directed at someone else.
19:04
why is it anytime you have to deal with a salesman to buy something, they refuse to use email and insist on gabbing on the phone?
@CharlieBrown - It is easier to interrupt you on the phone.
im like "yeah, i really prefer to have a record of this very expensive transaction"
@shakilahmad Each api is all part of the same API, just for different tasks
So you have to look through it and find the "Post a picture" piece
We are here to answer questions, not do the work for you :)
ack - When OOP goes horribly wrong stackoverflow.com/questions/28284893/…
lol, oh thats the best
and yet, i see it all the time consulting
19:13
Anyone know why I would receive an error in deserializing response from Google with:
        SitemapsResource.SubmitRequest submit = new SitemapsResource.SubmitRequest(service, url, feed);
        var submission = submit.Execute();
When I hit submit.Execute(); it fails every time.
It says "Google Apis fails...response"
@ReedCopsey Indeed
@ReedCopsey I've done that.
You've done what?
where 'that' is BusinessObject : IBusinessObject
But probably most of the fails in that question, to be honest
Typing too slowly today, sitting on a camp chair slightly too far away from my monitor. Turns out houses need furniture in them
Nothing wrong with Name : IName
19:24
what's the point, though?
@TravisJ for certain types of collaborators, yes. For stuff one might call 'services'
there's really no point in having an interface if you're only going to have a single implementation of it
@ReedCopsey - Well if that is all you have, then it is kinda pointless. But I will do that when Name is the base implementation of a set of implementations.
hi @CharlieBrown
then why have the interface? Just use the abstract class
19:25
I have a problem clearing the content of bootstrap modal before loading new data
For a class that represents a real thing, indirection sucks
make a new modal each time
though, to be honest, that guy went way beyond that as a problem - his use of partial classes is just crazy, too
@ReedCopsey - Because not all methods will implement their behavior in the same way.
Yeah, partial is useless imo
how to do that?
here's my code for the modal
19:27
Adding behaviour to autogenerated EF pocos, I use partials
<div id="responsive" class="modal container fade" data-backdrop="static" data-keyboard="false" tabindex="-1" style="display: none;">

<div class="modal-body">
<i class="fa fa-spinner fa-spin fa-4x"></i> Loading data, please wait
</div>

</div>
@ReedCopsey - Although now looking at it, I don't do that anywhere lol
Partials are useful when dealing with generated code. Thats about it
and the answers to the question as just as bad, IMO
Will's comments are the only sanity I see there ;)
@CharlieBrown how to add a new modal each? do i need to delete the old one and create and instance for the new one? i guess i need to use JS for this rigth?
right?
19:30
yes, js
i tried this code but after it clears the modal it doent's create it again
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script>
$.noConflict();
jQuery(document).ready(function () {
$("#responsive").on("hidden", function () { // remove the actual elements from the DOM when fully hidden
$("#responsive").removeData();
});
});

</script>
@ReedCopsey - I thought I had Entity : IEntity, but I broke out the different behaviors in Entity because they are shared in different places.
public abstract class Entity : ITenant, IActionRecord, ISoftDelete
and then I use that in my db classes
public class Car : Entity
yeah, different when you're implementing multiple interfaces
that makes sense
but abstract class Entity : IEntity is almost always over abstraction
@ReedCopsey if I describe an instance of some class as an 'agent' is that to you unambiguous? Bear with me
well, "agent" has a fairly specific meaning to me ;)
so if it's actually an agent, then potentially not
19:37
Yeah, my terminology is shaky. I'm using 'agent' to refer to something that sends and receives messages in a message-passing architecture
$("#responsive").remove() removes the element but after that i cannot see it on the document @CharlieBrown
@ReedCopsey the reason I brought it up was that I was wondering a little while ago whether there were situations where instances which are both agents and entities would be valuable. Where 'entity' is in the DDD sense, an instance which has a unique identity and might be an aggregate root but doesn't have to be. I was wondering what you thought of that idea
might be - but in general, I would never think of them being the same
because I wouldn't have an "entity" that's passed as a message
Not passed as a message, but as a message passer, a publisher/subscriber
Unless that's just how everybody does it and this is a non-question
Being currently subscribed would represent the notion of being 'live' i.e. participating in short-duration communication. An entity that is not currently live would not be rehydrated and therefore have no subscriptions
19:55
return this.MyBool != false;
areyoufuckingkiddingme.jpg
that looks pro
pro-racism maybe
@KendallFrey I raise YOU....
 public string BuildDataAccessForbidden(string actor)
        {
            HL7Document xmlDoc = new HL7Document();
            xmlDoc.LoadXml(
                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
                "<SOAP:Envelope xmlns:SOAP=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:b=\"http://schemas.microsoft.com/BizTalk/2003\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">" +
                "	<SOAP:Body>" +
                "		<SOAP:Fault>" +
                "			<faultcode>Forbidden</faultcode>" +
dey forgot da \r\n
that's what I code reviewed this morning. didn't even compile :(
19:58
comiple, huh
outerxml isn't a function, it's a property
i think kendalls might be worse
1. because it compiles

« first day (1570 days earlier)      last day (3604 days later) »