« first day (1635 days earlier)      last day (3314 days later) » 

12:00 AM
Hola people
 
Hey Tristan
That reminds me, I have to set up the new season of Louie to record
 
What's up @DaveS
 
you know, just coding iOS
 
I see....
 
12:12 AM
nice, farthest I've seen it since you linked
lmao you see that jmr?
 
12:56 AM
The moment you try something in code that you feel like might work but probably wont but you still have that feeling it might.
 
1:17 AM
wat
NSDate stores "the number of seconds from an arbitrary reference point (January 1st, 2001 GMT)"
January 1st 2001?
Whatever happened to 1970
 
pulling hair out
 
y2k, duh
 
y2k001
 
thats cause apple used a 0 index for the year so it didn't overflow until 2001
duh
alright im out all, peace
 
Storing a date without a time is the worst idea anyone ever came up with.
 
1:31 AM
@netpork I only just r-ewatched the Doctor scene, which is great.
 
I'mma run this past the room (so... nana), let me know if I'm over thinking it.
We make (effectively) a bug tracker for construction. Issues on a job site have due dates. A 'due date' is a calendar day - it is not a timestamp - so we receive them in the format 2015-03-30. That's fine, we can parse & display that no trouble.
But how do I store that in a way that makes sense? I'd like to be able to run queries against these items - WHERE due_date > $date AND due_date < $date
 
When formatted yyyy-mm-dd as you show there, string comparisons will work. If stored in SQL, use a date column type, and comparisons will work also.
 
It's in CoreData, backed by... SQLite I presume?
 
if your db has no date column type, and you can't switch to a good db, then use a datetime column type and just set the time to 00:00:00.
 
Yup SQLite.
 
Yeah that just maps it to a long I'm pretty sure.
 
Your choices are TEXT, REAL or INTEGER
 
Yeah, setting it to T00:00:00+0000 is my initial thought.
I don't really get a choice, CoreData hides all that for me :P
If I want to store it as an NSDate object (which is nice cos I get a bunch of stuff for free with that).
 
Yeah, just set the time part to midnight.
 
Mmmm.... hmmm. That might be okay. My concerns are around: setting the date locally (since most users aren't in GMT) and comparisons on the date.
 
1:44 AM
I was wondering about that. I think you set the time to zero before converting from local time to UTC.
 
Say I ask for "all items with due_date before today" - when I pass in today as an NSDate, I have to make sure that it was constructed with GMT locale... (otherwise I could very easily end up with items due today, or even tomorrow). Except that's not how CoreData works - you write queries directly against the objects ([NSPredicate withFormat:@"due_date < %@", [NSDate now]] or something like that). And I don't trust myself or anyone else to check that every time.
 
So in the database, the times won't be zero... because UTC.
 
I'd store it with time, taht time being 00:00:00
 
If I set time to zero then converted, I'll end up with a non-zero UTC time. If I set time to zero after converting, I could end up with the wrong date. Yaaaaay.
 
Well first thing is to make sure all time is stored and retrieved as UTC, then displayed according to what you want.
 
1:46 AM
Yeah that's the part I can't guarantee nana, cos CoreData.
 
How come?
ISO 8601 Data elements and interchange formats – Information interchange – Representation of dates and times is an international standard covering the exchange of date and time-related data. It was issued by the International Organization for Standardization (ISO) and was first published in 1988. The purpose of this standard is to provide an unambiguous and well-defined method of representing dates and times, so as to avoid misinterpretation of numeric representations of dates and times, particularly when data are transferred between countries with different conventions for writing numeric dates...
 
It's like... writing a WHERE clause with an ORM, but you write raw SQL - so you don't get any of the compile time safety.
 
Ahh, gotcha
Well then just store it as epoch time? Of the last millisecond in that day?
 
Yeah I know I know, I understand how date-times work :P This wouldn't be a problem if it was a time instant, but it's a calendar day instead, so I can't store it as an instant because that instant in time is different depending on where you are (or where your device is).
So if I assume 00:00:00+0000, that's a specific instant in time - and that can be either of 2 different days, depending on your local time zone.
 
But the actual time is the same planetwise
So when you create a task, you create it in NYC you are looking at UTC -5h
 
1:52 AM
Which is fine if I say "this is due 5pm EST March 30th" - that's 5pm east coast and 2pm west coast and that makes sense. But if I say "this is due March 30th" and I interpret that as March 30th at midnight in GMT, that's actually March 29th at... 7pm eastern.
 
You store the UTC in db, when you want to check if the task is due and are in Chicago, you are UTC -6 so you convert to UTC and check the db.
 
Yeah but the server sends it down as "YYYY-MM-DD"
Because reasons (apparently Rails handles this nicely).
 
Ok, so you don't know the timezone where it was created?
 
Correct - and that's not even relevant.
 
How come?
 
1:54 AM
Err, rather, I don't care or know about the time zone for display purposes, but it's getting in the way for calculation purposes.
 
Well you need to know when is task due.
So tell me know if I create a task right now and set it to be due today. I am in NYC it is 2155.
 
That means if I'm in say, NZ or Aus and read that task I see it as due yesterday. Yep.
 
You are in.. SK?.. your time is 19:55?
 
Business reasons getting in the way of programming. Yaaaaaay.
 
Well you really need to have the time in UTC from server or you need to know the location or at least timezone of the person who created it.
Otherwise you're missing an essential piece of information.
 
1:57 AM
I have this handled on Android, since I've fenced the database off from everything else - there's a special mapper for handling dates coming from/to the network, and a special mapper for sending them back up to the UI models, and a special method for querying against them, and JodaTime supports a LocalDate object.
 
So you're fine with seeing a task that is not due as due yesterday?
 
Yeah, I know :( I've argued this, and I knew it'd be a problem, but our customers simply don't care about times on their due dates (apparently... wait til that changes and I'm right) and since it's all handled easily server side...
And yep, that's fine - it's not at all likely, since our customers generally operate within one country.
 
YAY!!!!!!!!!!!!!!!!!!!!!!!!
 
So what I would do in your case is store it as either varchar or a number with the time set to just before midnight.
 
So I think my primary concern is that I can't programatically enforce a locale on dates passed to the query - the rest of it I can mostly build out myself.
 
2:00 AM
Then when they realize they dun goofed and start sending you time you are ready already.
in UTC
 
I ALMOST HAVE IT! I ALMOST HAVE IT!
Well, carry on ;P
 
That'll be a breaking API change, since it'll break our date parsers that expect a date and not a date-time.
Ugh. I can see the sense in having a calendar day, it's just a pain that it's not a thing that exists in Obj-C (and a "great power great responsibility" problem of CoreData).
 
Even better then, you will know when it happens. And I would opt in for VARCHAR, fuck 1970s
There is no such thing as calendar day though, is there?
 
You mean store it as 2015-03-30?
 
And if there is then its 48 hours long or so
No I mean store it according to ISO 8601
 
2:04 AM
Ah right - but my parser expects YYYY-MM-DD
:)
 
You'r API parser, right?
 
...hold on
Fucking RestKit man. It's some magic.
It sees I have an NSDate object and happily maps both YYYY-mm-dd and YYYY-MM-DDTHH:mm:ss... dates for me.
So it's already handling that for me.
 
Good
 
So it won't be a breaking API change for web (since we can roll the front & back end out simultaneously) and it's already handled client side - assuming we maintain GMT when we eventually switch to timestamps.
Actually, that doens't matter, since the full timestamp will have the timezone on it...
 
Time sucks
 
2:10 AM
So the only thing I have to do is ensure that every query made against the due date on an item is made with a date constructed assuming UTC.
 
Yeah UTC, not GMT
 
Yeah I use them interchangeably, apparently - I do realise they're technically different.
 
Yep, just forget GMT exists ;)
 
Hmmm. I suspect we'll be a bit buggered if we do switch to a timestamp based solution though. Bah. Screw it, that'll do. So my solution is: I don't have to write any code, I just have to write some documentation.
Okay!
 
What ORM do you use?
 
2:23 AM
I'm using ORMLite on Android.
 
Awesome! Me too, I am currently fighting it.
 
Successfully kept out of all of our views. We have a few custom query builders, and some search classes that run those queries (or custom handwritten SQL in a few cases) and return RxJava Observables.
We have 10:1 iPhone:Android users though, so since we've realised that all dev on the new Android version has stopped... I'd really like to finish it, I've put 6 months of work into it :(
 
My objects are kind of deep, so I am runnign them in parallel but I had issues with concurrent changes to variables and such
 
Really? You're not running stuff in a transaction?
 
Same here pretty much. And I can honestly say that the Android app runs better and has more functionality, but no users.
Nope, no transactions yet..
 
2:27 AM
dao.callBatchTasks(new Callable { ... } ); runs in a transaction.
 
I have 14 tables.
Which doesn't have much to do with anything, just an idea of scale.
I have .store() method on all my objects and I just call that method when I need to update or create a new row.
The thing is soem of these obejcts call store on it's subobjects, do you think I could somehow use transactions in this scenario too?
 
Heh. I have... 19.
Interesting, I don't know what happens if you try to start another one while inside one already...
 
Alright! Great! So now you will help me :)
 
Oooh I was wrong about what callBatchTasks does, kinda.
 
Hmm...
Honestly I am not seeing it..
 
2:49 AM
I have a problem
 
3:04 AM
if ((i.id == null && id != null) || (i.id != null && id == null) || (id != null && !id.equals(i.id))) {
    return false;
}
Ïs this simplifiable?
It looks ridiculous, and I will need 5 of those in .equals() override.
if ((id != null && !id.equals(i.id)) || (i.id != null && !i.id.equals(id))) {
    return false;
}
That should do
Nope
 
3:22 AM
@nana Oh, what a mess. What's the "Y" of that problem?
 
I am implementing a equals method for my POJO that has a bunch of Longs and Strings apart from other objects in it.
There is this.id and that.id for example where that is same type as this, but perhaps a different instance.
In the excerpt above I use i.id instead of that.id to save space, and I don't use this at all.
So it can be simplified to how to compare two Long objects ?
 
This would be easier if I weren't already into my rum ration :)
 
:)
 
What should happen if both i.id and id are null?
 
they are same
so nothing if the if returns false., it should not enter the if statement
 
3:34 AM
OK. If they are both null, same. If only one is null, false. If both are not null, compare.
 
Yes
 
I've just got the feeling that something is not quite right here. What comes after that if?
 
if(!((id == i.id) || (id != null && id.equals(i.id)))) return false;
^ I think this might be it
 
I'll defer to your non-addled brain :)
 
Let me type it out and let's see if I fucked up
 
3:39 AM
Let's just forget I said anything ;)
I did notice that half your conditional is an exclusive or. (i.id == null && id != null) || (i.id != null && id == null) may be equivalent to (i.id == null ^ id == null).
 
So basically if they are identical (this means they are both null or by some crazy luck it's the same instance, or some crazy java magical cashing) they definitely .equals, if we werent that lucky and this.id is not null and equal to that.id they still .equals, if this.id is not null and doesn't equal they don't .equals and if this,id is null we already know that that.id is not null because we passed the first test (null == null)
...
Hmm, about that XOR..
 
@Prachi Welcome. Please read the room rules room-15.github.io
 
He's not even here.
 
hmm...I saw that after I sent it
But it let me auto complete his name
 
I was wondering how you did that.
 
3:55 AM
Usually doesn't let me if the person isn't in
Cache...it's always cache
 
@nana So, nope. Even this one is wrong, because Object.equals(null) apparently throws NPE, awesome.
The best thing is, that Long has a compare method, but it only takes long.
 
4:51 AM
is it possible to change e-mail that's tied to StackExchange account?
 
Time to sleep, good night.
 
that doesn't change login email
 
You have to click on my logins but it looks like you can only add a login from a selection of services.
 
yes
looks like I need to create another profile and then merge them
 
5:20 AM
Hello good afternoon
What machine are you guys using for dev?
 
@nayoso ^
 
Nice!
been thinking of getting macbook pro too
but the 15 inch one haven't been updated since 2013 right?
 
I don't think it's necessarily a good idea
there are downsides that you will discover after a couple of months
 
Yes that's why I'm considering the macbook air
 
yes, the hardware isn't updated
 
5:24 AM
for example?
I used 2013 macbook air at my prev company
 
for development there are probably no downsides, but if you are going to use it for anything else too, then you may encounter some shit
most of the problems can be solved, though
first, the display backlight is blue, and it's killing eyes
 
Ah I see
 
this is partially solved by installing f.lux and setting white balance (color temperature) to a point near the minimum
but the black is not really black, it's a dark blue
so if you want to look at high dynamic range picture/movie and raise brightness, you are unlucky
it would look not really good
second, only two fucking USB ports
no need to comment I think
the screen is glossy, so there would be reflections
in a "right" environment it's possible to deal with it, though
bundled sound card/DAC is not really great (but I think other laptops are not better here) — it produces noise and clicks that can be heard when using low impedance headphones
 
Yeah I hate the only two usb ports...
 
the cooling is not good, the laptop is not suitable for constantly stressing the CPU
 
5:33 AM
because usually I use this centrance.com/products/dacport
as my DAC/Amp
 
but it's generally not a problem if doing only development
 
I see
 
yes, I have external DAC too and for now I have to give it up
 
because of the usb port?
 
this is all only hardware problems
yes
and there are some problems in OS X, too
 
5:34 AM
If you have money to buy a new machine what would you buy?
 
I dunno
I would save them and buy a new bicycle maybe
 
lolol
 
or do some house improvement
 
I see
So you are from Russia?
 
I think I would assemble a full sized PC at some time, but not now, because I hope I will not live here after 1-2, maybe 3 years
and taking a full sized PC to another place is not so easy
 
5:36 AM
Hmmm full sized PC would be a good think at home
 
but not for work
 
I work from home usually
:P
 
I considered full sized PC for like an entertaiment center
Ah good for you!
 
yes, it is (just look at the SO survey results)
 
5:37 AM
hahah I just read it one hour ago
 
some stats for Russia are rather crazy 8)
like 2x more bucks for remote work vs non-remote
 
Is that true?
in your case
 
I think yes
 
5:53 AM
Good for you then!
 
6:05 AM
Yo People
 
Sarge, what's up lemon boy ?
 
6:25 AM
my pimple gets better…
 
6:36 AM
nice
 
7:19 AM
Hello people
 
7:37 AM
o/
 
\o
 
Is it good to get ffmpeg from here ?
 
8:13 AM
o/
 
looks ok, but library has 12 reported bugs
 
All I want is to get the compiled .so file, and that is where I got stuck.
 
are you getting any error?
 
NDK_BASE=/path/to/android-ndk
does it look like a path on your machine ?
are you on windows?
 
8:28 AM
That is correct. I have set the path in environment path variable. That's the line I copied from the link I am following to.
Yes on Windows
 
I can't help you then, sorry
 
T_T Sniff! Sniff!
 
9:18 AM
o/ everyone except TLN because he uses windows.
 
That's not fair! :/
 
9:40 AM
yeah, but he is hardcore, he is using xp
 
It is Windows 7 :|
 
The true hardcores use windows93.net
 
My ASUS doesn't work well on Ubuntu, That is why I have got no choice.
> Developers in India are 3-times more likely to be female than developers in the United States.
:)
 
9:56 AM
That is weirdly phrased
 
what does not work on ubuntu
 
10:18 AM
TouchPad shows weird behaviour
mouse clicking does not work.
I had to use keyboard for everything.
 
looks like the GNU/Linux way
(to use only keyboard)
 
10:41 AM
I bet there is a fix for that
 
Because of trying every possible fixes, my HDD got crashed. I am okay with Windows 8.1 now. That's on what ASUS works like a charm. :)
 
the results of SO survey are great )
Ukraine is even #1 in one category )
 
11:00 AM
Yay! Most Wanted technology: Android
 
@TheLittleNaruto hmh, you are using windows 7 and windows 8, dual boot? :)
 
Windows 8.1 that's for my ASUS laptop. And Windows 7 in Office PC.
 
sure, there are no excuses for not having linux on office pc
 
Yeah! because I have no rights to install it, Networking Team take care of that.
 
Game Over
 
 
1 hour later…
12:14 PM
Morning! First!
@AdamS Do you use OrmLite ClosableIterators anywhere in your code?
 
morning, Sensei!
 
Good moonring TLN
 
Any melody/slow song, you want to recommend ? I want piece for a while.
 
Nope! Got a custom paging solution with rxjava set up
I can go into more detail in a couple hours, pretty busy this morning.
 
@TheLittleNaruto Aphex Twin - Flim: youtu.be/RhHkUg-QCwk
 
12:20 PM
Hrm..I'd be interested I think. I use them, they work, but the don'T seem to refresh the models as they should.
 
Thanks netpork, Let me listen :)
 
^^ Wow, Aphex, good choice.
 
I am listening to this now youtube.com/…
 
What ? A question with bounty can not be closed ?
 
12:28 PM
fuck, how do those people get some rep at all? I've done some answering, researches - I even tend them to somehow unique, though maybe not of highest quality
And I have 124
this duck has 300+ - waat?
 
Den, how do you only have 124?
 
tell SO I'm offended with this and don't talk to it no more ))
I didn't get much answering lately
but also no questions. Maybe I'm on my way to accumulate some knowledge and become a valuable member of SO community, we'll see
so far I'm just procrastinating instead of coding, lol
 
I need to answer some, but every time I stumble upon somethinng I know how to answer someone did it aalready.
@TheLittleNaruto If you like calming music and never heard of Boards of Canada, give them a listen.
 
12:47 PM
never heard, Okay now listening...
@netpork It was nice :)
 
1:03 PM
o/
 
\o Magic, Glitch. JMR
Sensei, Aphex is awesome, Seriously!
 
Morning
 
morning Mr
 
o/ cM, MrEng, Glitch
 
1:06 PM
Once again, this year, nobody claimed my 2 eggs for Easter :(
 
o/ all
 
Maybe you should have painted them and put them on display.
 
OcuS got boiled eggs without painting and thinking somebody would claim, lol
 
I think Ocus is talking about something different, Naruto ;)
 
 
1:09 PM
Is he ? I thought it's about Easter where People paint eggs and hunt for it.
 
Oh yeah, definitely
 
Ah, it is different, Now I can see that, magic.
 
:D
 
If you displayed them like that, then I have no clue why there were no takers.
 
1:41 PM
Also, if anyone would like to close ^
 
Done ^
 
thanks :)
 
Done ^^
 
very kind
 
1:43 PM
\o
 
Done :o
 
tln did you install linux ?
 
1:46 PM
I already tried on my ASUS before, that made HDD crashed. and I dont want to let that happen again. I'll try Virtual Box
 
hdd crashed ?
 
what you mean ?
 
Coronoid - Still | NVScene 2015 | 60fps: youtu.be/7JV8b9r6r3k
 
Hard Disk got crashed.
 
1:46 PM
From installing Linux? o.O
 
In my laptop I cannot boot linux, since I have the old Nvidia graphic card and after 30 mins linux freezes entirely Oo
#true_story
 
read from here
I don't want to spam the room by same conversation. ._.
 
I've been having weird issues on my desktop since I installed Ubuntu but I had issues with Windows too so...whatever
 
if u dont lack RAM vmware its a way to go
 
8GB RAM, enough ?
 
1:48 PM
ofc, super good
 
31
Q: Undo the [android-wear] -> [android] tag synonym again

gruszczyI think this happened before and now it happened again. When I click my saved android-wear it takes me to android questions. Could we revert this once again? The rationale is that I am comfortable answering android-wear questions and would like to look only for them. If I get redirected to andro...

 
\o
reddit with my morning coffee... "Worse than ISIS"
Wonder if this is where @DaveS works...
 
lol
 
@Allu denied for not quite meeting our required rep (100) and using chat only for support. See the rules for more infor
 
2:02 PM
@netpork That was beautiful.
 
2:13 PM
\o
 
Oh, Dagger 2 was finally released BTW.
3
 
great news
 
@eenvincible I didnt quite understand what's the santa all about?
Is it like a general new API that we can use
 
You have to know about Santa Tracker first
 
2:44 PM
lol
 
0/
How's everyone doing?
 
hey Nathaniel
 
@Allu I'm a little concerned with how you suddenly got the required rep...
 
How's the peeps doing?
 
good here; another day
 
2:50 PM
Yo, nate
 
Yo code
Glad to hear we're doing alright
sometimes Android Studio...
 
sometimes not Android Studio
 
Since most of you are from the States, I would like to ask you if you are aware of any lifehack that would allow me to migrate there -> currently living in EU
 
Where in EU?
 
Greece
 
2:56 PM
Pay what you owe Germany, then we can talk.
 
That's a long conversation to do, but really is there any flexible way of migrating to USA? btw @nana do not buy this bullshit propaganda media throws once in a while
 
I don't.
 
why USA?
 
There are couple options actually, do you have a ton of money? $100k+
If not there are still ways, but a little harder. You can find a job in advance and have them file a B1 for you.
 

« first day (1635 days earlier)      last day (3314 days later) »