« first day (1943 days earlier)      last day (2999 days later) » 

5:00 PM
@Greg if you're using EF, then why are you doing old school sqlConnection?
you know you can execute sql through ef
 
@SteveG Because I can't do th is query via EF because it is all crazy and the a Stored Procedure.
 
@Greg you can execute SPs in EF
 
@SteveG With a 7 table multi table result.
Entity Framework doesn't support multiple data result sets.
 
well, if you already have one SP, why not create a second out of that crazy query and call it via EF? I know a lot of people in here dislike SP's, but oh well
 
I don't dislike SPs. I dislike people who put business logic in SPs.
 
user47589
5:02 PM
because his dba is unhelpful
 
I AM THE LINQ GOD
 
SP they are like a backend Classes
 
I have a DBA who isn't helping.
 
@Wardy LINQ FOR THE LINQ GOD
 
@mikeTheLiar i would rather not ... its too scary
 
5:03 PM
one of the attributes of a God is to give people what they want when they pray for it (this is almost all BS but oh well). What are you giving me? i want a porche
 
user47589
YOU RECEIVE LINQ
 
@SteveG stop smoking and drinking = buy a Porche
 
@Wardy wait, method syntax or query syntax?
 
@juanvan :O
i wouldn't be able to live
 
@SteveG at some point in the distant future I may consider you to have proved your fealty to me and reward you with a linq representation of a porche ;)
 
5:04 PM
Just had a meeting with VP and coworker to discuss web forms project lol. I don't know whether I did right or wrong but when VP said :"I could be wrong but is the code Java?" I was like "No... it's C# but... it's web forms, which is legacy and old!" Then my coworkers said: "Yeah, no one uses it anymore" and then he went on about EF and how awesome it is.... I hope I didn't give VP wrong impression on how much I hate this project before i leave lol
 
Because if you're the god of query syntax then you can just fuck right off
 
my liver might go into shock
 
Right!!! Stopped smoking Purchased a car
the payments are about the same as my bar bill was most weekends
 
user47589
"It’s the hardest working liver in the galaxy, Morty. Now it has a hole in it!"
 
@mikeTheLiar query syntax ... I had to do some wierd shit to project data from denormalisaed mess in to normalised mess with aggregation of child row stats to an IQueryable of some type with like 6 child collections
and the beauty is ... the resulting set sits behind an odata controller so its queryable :)
right i'm going to go home and cry that LINQ picked on me all day to the other half as I know we all do ... don't deny it ... and claim i had a worse day than she did working for the nhs.
 
5:07 PM
@SteveG um......... no
 
you don't remember the movie DodgeBall where the guy likes to drink his own piss
 
"If you can dodge a Wrench, you can Dodge a Ball"
 
user47589
great movie
 
I asked if I can use git or hg for version control... the response was SVN umm
I guess I can use SVN?
 
user47589
5:09 PM
SVN is fine for corporate environments.
 
@KalaJ SVN won't make you want to slit your wrists every day
 
user47589
I don't find suicide jokes funny or appropriate.
 
lol what do you use???
o.O
 
@KendallFrey i really expected rebecca black
 
@KalaJ git, when I have a choice
 
5:11 PM
Could be worse. Could be TFS
 
@Amy bin it
I agree
 
Does show log in SVN show all the revisions?
 
@KalaJ yes
Well, it can, if you hit "Show All"
(assuming TortoiseSVN)
 
yes this is tortoisesvn
and I hate it for things not document related
 
@KalaJ I deal with too much other crappy software to see much of a problem with SVN in the day-to-day
I remember I have gripes but I forget what they are
I usually start drinking heavily after I remember them
 
5:18 PM
that sounds like a plan
 
So I am inserting strings from a C# file into a word document. but the "\r\n" and Environment.NewLine cause Word to think its some sort of newLine + indent character.
is there any other options for end of line besides "\r\n" and Envionment.NewLine?
 
user47589
word doesn't encode newlines in documents like that. i have no idea what it uses
 
user47589
1
Q: Inserting A Line Break (Not A Paragraph Break) Programatically To A Word Document

user3731528I am using the Office Developer Tools for Visual Studio 2013 in C#. Ever since Word 2007, adding a "\n" character adds a paragraph break (which adds more space than the line break in Word). How can I add a line break to a document? I've tried "\n", "\r", and "\r\n" all of which seem to add a par...

 
\r seems to be the NewLine for Word
 
@Michael how are you doing this? Are you using OpenXML? Or just File.WriteAllText("MyDoc.docx")?
 
5:24 PM
Im just kinda editing a piece of (code). I'm sure its more just C# file IO not OpenXML
it doesnt like "\v" at all
 
user47589
"Im just kinda editing a piece of this" isn't very descriptive of what you're doing.
 
and its not "\r" either
 
Well when all else fails just try random escape sequences until you find something that works.
 
lmao
wow I make some terrible typos
 
user47589
your edit isn't any more informative.
 
5:26 PM
i'm sorry. Its fail
I'll leave it to die
 
user47589
I think we would all assume you're editing code.
 
Is there a golden list of escape sequences?
 
There is no escape.
2
 
user47589
Unless you're using JicamaJS. Then all bets are off. You're probably sipping a margarita.
 
wow this is annoying
 
user47589
margaritas aren't annoying. you take that back
 
I have a conundrum.
I wish to acquire food. I don't want to have to put my boots back on. I don't want to go outside in my sneakers.
 
I have to bother you guys with this subject again...
does anyone know how java's cacerts can be imported (or rather, used as it should be) in windows' Certification Root Authorities?
 
import them to the Certs - this are the Root certs?
 
root certs?
 
5:34 PM
is there an easy way to look behind a word document and see how the end of line characters are encoded?
 
@Michael OpenXML Productivity tool
Or just unzip the word doc
 
I have a .p12 file which supposedly holds the certification, but it still throws errors upon connection, @juanvan
 
user47589
@Michael is it a .docx?
 
!!afk "we must construct additional panini"
 
Agile in the Enterprise tl;dr:
 
5:35 PM
yes it is docx
 
user47589
then do what mike said
 
So I downloaded /installed that tool.. its not an actual program?
 
user47589
we have no idea what you downloaded. how can we answer that question?
 
5:37 PM
 
Looper
 
user47589
"The tools package contains the Open XML SDK v2.5 Productivity Tool for Office and the hyperlink to documentation for the Open XML SDK 2.5. The Open XML SDK 2.5 Productivity Tool for Microsoft Office provides a number of features designed to improve your productivity and accelerate your learning while working with the SDK and Open XML files."
 
user47589
did you download the tools?
 
@juanvan so that means that p12-based certs won't be recognized, and I have to convert them to a .cert file?
 
5:40 PM
means you need to install openssl before it can be imported; from that doc
ohh so Openssl does export the crt files
did more reading
hate tofu
 
hm.. I guess I had to download the other version
 
guess the .p12 is kinda like a rar file
other version? from
 
there were 2 different .msi Files from that download link.
alrightt..... xml. Nice.
No idea what I'm looking it
Alright... Just gona hack my way through this one. Will tell the word document to not allow any indents, where I dont want to indent.
 
The one true #JavaScript exception handler. ;) https://t.co/Zwoi3VlluD
 
5:57 PM
hahaha, nice find @Jeremy
 
user47589
i dont have access to twitter. what's the link? or what does the tweet say?
 
omng
 
user47589
lol
 
stop submitting github issues to jicamajs
 
6:04 PM
@Failsafe did you just tell me to open issues on jicamajs?
 
stop
 
HAMMERTIME!
 
@Failsafe ok fine I will but let me finish my work first
 
@Michael if you open the docx in the productivity tool you can "reflect code" (or something like that) that will show you the C# required to create the document
 
@mikeTheLiar okay, thanks :) I'll look into that
 
6:08 PM
@Failsafe "bug: jicamaJS is rendering JavaScript when it should be rendering magic"
 
how can I pass an int by ref? This code isn't compiling pastebin.com/raw/B2F3GAMs
 
neither is it loading
 
take out the raw
 
@barlop The error message should explain what the problem is
 
user47589
asdf isn't static
 
user47589
6:10 PM
as @KendallFrey said, the error should say as much
 
didn't even see that
 
does it matter a has no value when passed
 
user47589
yeah. that code has a lot of problems, none of which involve the ref keyword.
 
*one
 
user47589
6:13 PM
two.
 
user47589
two is a lot, right?
 
two is a company
 
user47589
okay, so that code has a company of problems.
 
a slew of problems
 
user47589
sigh how many is a slew?
 
user47589
6:18 PM
this is getting as confusing as the japanese counting words
 
more then a couple less then a company
 
@Amy a slew is three
 
user47589
well it doesn't have a slew of problems.
 
Has anyone here worked with Scala enough to have a strong opinion of it?
I'm intrigued.
 
user47589
I have an opinion, but it isn't strong.
 
6:22 PM
@Amy What is that opinion
 
user47589
imo its a fantastic language that isn't used nearly enough
 
user47589
if you want to target the JVM and don't want to use the evil Java language, Scala is the way to go
 
user47589
I'm a fan of functional languages.
 
It feels a lot like C#.
 
user47589
how's that?
 
6:27 PM
It makes him feel smart when he uses it.
 
@TomW lol
 
btw, does anyone have a solution to the AWS timezone problem?
 
no that's haskell silly
 
*AWS RDS
 
user47589
haskell makes me feel dumb
 
user47589
6:28 PM
i wasn't aware AWS had a timezone problem.
 
@Amy both are statically- and strongly-typed OO languages with a functional bent/focus to them
though Scala more than C#
 
so I'm trying to restore a SQL db in azure from a .bacpac backup in azure blob storage. The portal gave me an "in progress" status with no progressbar/percentage for a while. I tried refreshing and it's gone.
 
virtual by default still scares the hell out of me though
why is that a good idea
 
And I'm now at a loss as to how to check progress of this thing
 
probably an implicit choice when targeting the JVM, but still...
 
6:30 PM
@Amy, AWS uses UTC, but people with +/-x offset will have problems using GETDATE()
That is, in SQL Server
 
user47589
virtual by default scares you? you should set VirtualIsScary to false.
 
hey guys
 
Morning @Codeman
 
user47589
@EricWu what about GETUTCDATE()?
 
The powershell command Get-AzureSqlDatabaseOperation lists a CREATE_DATABASE: COMPLETED entry, but I know I can't trust it, since I can see tables are still changing
 
6:30 PM
Afternoon @Codeman
@Amy that involves changing 300+ procedures we have already in production
we're trying to avoid that
 
just use UTC for everything until you get clientside
 
user47589
what codeman said.
 
namely this _TransactionIndex_41842814-142801284-herpaderp temporary table it apparently uses when restoring a bacpac
 
user47589
use UTC everywhere except the client.
 
@Amy I guess I shouldn't be too scared of it. I could just specify non-virtual where I care.
 
6:32 PM
@EricWu find-replace :^)
 
@MikeAsdf again, we're trying to avoid replacing all those procedures
 
you do have those procedures in your VCS ye?
 
nope @scheien
 
time data can be a hard thing to unfuck
 
you should @EricWu
 
6:33 PM
@Codeman Is correct. Your software doesn't care about time zones, only the client does.
Clients want weird and magical things, things that even fuzzy dice, unicorns and J.Skeep can't even deliver some times (Blasphemy, i know).
 
user47589
you can use SYSDATETIMEOFFSET() to get the timezone offset AWS is using
 
@RyanTernier, but what about the logs and history and else? there isn't a pattern about where we get the datetime from
 
mmm, coffee. thank jesus (jesus is the Mexican guy that makes my coffee)
 
sometimes, actions are logged with GETDATE(), others with DateTime.Now
 
@EricWu sounds like you have a great case to recoup some tech debt :)
 
6:35 PM
We have some old mission-critical code that stores stuff in local time...
 
@EricWu A practice I always do for logging and history is to display both server time for when the log took place and the UTC time of it as well.
 
I asked someone if it was server-local or client-local, and they didn't know.
I investigated and it's not consistent.
 
DATETIME in SQL Server should have a timezone in it, as well
 
Many sads were had that day.
 
@RyanTernier, I know, but this code is almost 10 years old, and we have a schedule to deliver it all to RDS
@Codeman amen to that
 
6:36 PM
@EricWu I never said it was easy or pretty. Welcome to Software Development :)
 
@Codeman timezone in the column data?
"should" as in wishful thinking or "should" as in you believe that to already be reality?
 
If you want easy and pretty, go back to college. ;)
 
My first boss had all date times stored in ticks. He said it was best because it was language agnostic. /bangs head on desk
 
@MikeAsdf no, it's included in DATETIME by default
 
@RyanTernier lol
 
user47589
6:37 PM
well technically he's right, ticks are language agnostic.
 
Guys, I am making a Site ( store like site which ppl can register/login add to cart and purchase ) Should i use like what i am already used too and make the SQL using SQL Server Manager and then Use in my Code ? or should i go Learn Entity Framework ? It's MVC with C#
 
@RyanTernier "number of seconds since Unix epoch" isn't terrible
 
I guess I never checked because I've always had them stored in UTC as God intended
 
JavaScript Ticks != .Net Ticks != Java Ticks
 
user47589
right, the epoch matters
 
6:38 PM
@MikeAsdf Hey there. God loves DateTimes of all orientations.
 
user47589
lol
 
should we call JonSkeet here to solve this?
 
@Codeman are you sure you're not thinking of datetimeoffset?
 
user47589
summon the Skeet?
 
Eric Wu, what is the actual issue you're trying to resolve?
 
6:39 PM
https://msdn.microsoft.com/en-us/library/ms187819.aspx "Time zone offset aware and preservation:
No"
 
we have a wcf-based system calling a 2008 sql server database, both of which are originally in a -2 UTC offset server
and we're migrating it all to AWS
 
I work with a system that can take data from a desktop app. Older versions used local time instead of UTC, and we've discussed fixing the data by trying to infer the original timezone from the user's reported location.
 
AWS - SQL Server uses the server timezone, and that can't be modified. Are you trying to find the best way of updating the Dates in the SQL Server and all your log files to the new AWS timezone?
 
@RyanTernier yes, while respecting our timezone
 
I think right now we partition data into "known utc" and "unknown" and if it's unknown we skip the convert-to-user's-local-time at display time and spit the timestamps out verbatim. It's been a while since I looked at that code.
 
6:43 PM
Questions:
1) How often do you review old log files? These could be categorically archived when you moved with instruction that they are a specific time zone
2) You should be able to create a simple script to modify all DateTime fields in the DB after the move. Was this considered?
Log Files are mainly used when there's a real time ops issue - an Incident. If you move to AWS, your old log files will not be as useful as current ones.
 
@MikeAsdf That sounds reasonable. Right now it's just super frustrating because we actually have no idea what timezone the data is in, and by not fixing it, we're pumping out more useless data.
 
@EricWu Do you want to keep the UTC-2 time zone for all your logging?
 
@RyanTernier, these 'oops' happen more oftenly than not
yep
 
Oh you know what's really fun? A web server in Great Britain suddenly failing to save data on the 13th of the month. Since apparently it was sending dates to SQL as date.ToString() without specifying localization explicitly.
 
preferrably, everytime we use GETDATE(), with the least modification possible :)
 
6:44 PM
Which also means that for 12 days it was saving incorrect dates.
 
user47589
wow mike
 
select cast(current_timestamp as timestamp)
:^)
 
@EricWu Yes, oops' might happen a lot, however will *old* log files be useful once you move? Have you asked ops?
Can you modify the code to have both the Current Server Time and UTC -2 Time in the logs?
 
SQL's parsing is apparently more immune to the locale and was expecting month-day-year. But brit IIS was sending day-month-year.
 
@RyanTernier, they will, but the newer ones won't. Since they'll be saved with a +2 offset, all those logs will be read ... wrongly (?)
 
6:47 PM
I sometimes would change my windows localization settings to format dates with backslashes to try to catch intern-tier code locally.
 
@EricWu Are those DB logs or File System logs?
 
@RyanTernier custom ones. We log every action the user does, not necessarily DB-based
 
!!> (typeof(![]))[![]+![]] + ([]+![])[![]+!![]] + ([]+[][[]])[!![]+!![]] + ([]+typeof([]))[!![]+!![]+!![]+!![]] + ([]+typeof([]))[![]+![]] + ([]+[][[]])[!![]+!![]] + ([]+!![])[!![]+!![]+!![]];
 
@Jeremy "badcode"
 
the correct rectification will probably depend on how the data's used, how "important" the dates' correctness is, and what additional information can be used to fix the data (e.g. like knowing from other columns or joinable tables what server inserted the data)
 
6:54 PM
@CapricaSix me_irl
 
user47589
anyone here used CacheCow? i just started using it, but the documentation is horrible
 
user47589
maybe i should look for an alternative
 
@Amy CREAM - Cache Rules Everything Around Me
 
> A python programmer walks into a bar and asks for something imported.
 
user47589
is that a library or a meme?
 
6:56 PM
!!youtube CREAM wutang
 
Oh God. My manager is now asking QA to take a look at the page that he pushed live yesterday, 10 minutes before EOD.
 
@EricWu That's a fun one. I'd most likely try to change client expectations somewhat and archive old File System logs, new logs would have UTC and UTC-2 eventually. For the DB, you could either: Create a new function as GetDate2() (the name rocks I know), or start saving everything as UTC
 
user47589
haha, let's have QA look at it after we deploy it to production
 
user47589
brilliant!
 
6:57 PM
Testing in Production
 
user47589
 
Why pay for QA when our users will do it for free?
 
@RyanTernier then, if we need to reach for those logs, we have to remember adding/removing the offset from what is recorded in the database, no?
 
user47589
i like the way you think. Fire the entire QA team!
 
We full MSFT now
/s
 
6:58 PM
@EricWu Unfortunately if you go with the DB as UTC. If you decide to create a new GETDATE() method, you could quickly update all SP/Functions in the DB to use that new method, and then do the same with the code.
 
Guys, I am making a Site ( store like site which ppl can register/login add to cart and purchase ) Should i use like what i am already used too and make the SQL using SQL Server Manager and then Use in my Code ? or should i go Learn Entity Framework ? It's MVC with C#
 
user47589
its possible to query the SPROCs source for instances of the word "GetDate"
 
user47589
my dba did that once upon a time
 

« first day (1943 days earlier)      last day (2999 days later) »