« first day (1655 days earlier)      last day (3522 days later) » 

I need some regex help
hows android world?
regexp <3
also Cspans website sucks
17:11
so I have a string that I want to split at either "(rep" or (Rep"
I am using this: .split(" \\(" + "rep") to split at " (rep" only
first of all, I didn't understand why I had to split the regex string, but that's the only way it worked
now I need to change it to match the capital R too
38
Q: Regex case sensitive

brotherHow can i make the following regex ignore case sensitive, and match all with the correct chars, but ignore wheter it is lower or uppercase? G[a-b].*

what's tour string like ?
so that covers case sensitivity
apparently its ?a
apparently my problems are not with regex itself, but with getting the regex string formatted correctly in the way java likes it
17:15
it should work like this: "/ \(rep/i"
15
Q: Chat Easy Input Tools - Provides keyboard shortcuts for common text formatting commands

rlemon About Provides keyboard shortcuts for common text formatting commands, reducing the dependency on mouse usage. Current version does not have a configurable set of hotkeys but later versions will. How to use. All of the following commands are run if the user has focus in the chat input area. ...

Just saw that when spying on the js room.
try
\\\
just cause
instead of \\
posted on April 28, 2015 by Tor Norbye

Android Studio 1.2 Release Candidate 3 is now available in the beta channel. This build incorporates the final release of version 1.2 of the Android Gradle plugin. Installation You can use the update mechanism to update from earlier builds of 1.2 as well as from version 1.1 (stable). Note that the build is only available in the dev and canary channels, not the beta or stable channels, so if y

17:18
"\\(Rep" is OK for me...
do I need to double the forward slash too?
"// \\(rep//i" ?
no, just for the \. because \ is for escape sequence
nope, didn't work
I hate regex personally
escape sequence are : \n, \t, \r...
so you need to tell that your \ is not an escape sequence by escaping it
you don't hate regexp, you hate languages using regexp
regexp's are so great once you know them
17:23
.....
Languages or not, I still hate them ;)
every time i've seen them in code its always been a huge, way overcomplicated mess of crap that could have been done more simply and clearly some other way
not saying its ALWAYS like that,
a real good programmer MUST know how to read/write regexp. no exception.
but its just been my experieince
Meh
I hate Java regex, but am fine with other regexes
a good programmer MUST no how to look stuff up
regex included
sure
17:25
;) I'm trying to highlight how silly "a good programmer MUST" is...
but I really hate when programmers say they don't like regexps. they just didn't want to try enough.
a good programmer MUST know the difference between "no" and "know"
I don't hate regexp, regexp hates me.
In communist russia, expressions are irregular.
regexps are just a logic thing. isn't logic a programmer's thing ? :/
best site about regexps : regexcrossword.com
17:29
no dave, thats the compilers job ;)
and in regards to "just didn't want to try enough" i'm not sure you read my reasons: Every single time i've ever encountered a regex its been unnecessary and overcomplicated a simple thing
when I start seeing regex' used regularly in ways that 1) don't convolute logic and 2) are actually necessary I'll gladly change my toon
who cares about right-to-left languages?
regex are very useful in input validation
ah yea Dave, thats fair
i almost never deal with user input myself
failed cM
Nope, passed with flying colors
17:33
I've used them a few times, 100% of those times have been for input validation
I can't think of a use case for them when it's not input validation
i remember I had to edit one once... i wonder if I can find it...
except maybe parsing complex things
another test blah blah
17:34
failed
it was about 70 characters long, and was slower than doing the comparisons via string.split and checking the individual bins
I'm an idiot
16
Boo
no code
you are our leader...shit...we're all idiots...
CTRL and ALT aren't the same keys :P
I very often use regexp to transform code from on language to another ; like right now I have the SQL for a CREATE TABLE and I wan't to create a java class with the same members as the table fields => search/replace with regexp, done in 30s
17:36
speak for yourself, cM is more like a political enemy, we keep up a friendly exterior but underneath, plots of assassination.
Dave, shhhh don't speak
yeah regex is very useful when used right I've used them in find and replace before
yeah that's the typical use case
yeaaa when I see regex its stuff like this
17:38
They definitely can be used inappropriately. I've found myself starting to use it sometimes then realizing I was making it much harder than it needed to be
address validation is a PITA though Nathaniel
Dave you're flip flopping here
email address validation is basically a np hard problem
we don't accept flip floppers in this room
thats why, despite actually holding a much more mild stance on this topic than presented, I still must insist that regex's suck
I never said I didn't like them or that they weren't useful
17:39
as do all of you for using them ;)
eski: maybe you already know — is there something like GridLayout on iOS?
I dunno
except Code, cause he's our idiot-savant leader
I've never needed GridLayout on android actually
17:40
same here lol
There's no concept of layouts in iOS afaik
if you want a grid you have to just make a grid
oh yea this reminds me
I'm doing some debate iOS vs Android
guys got any good "screw iOS" stuff I can use?
string comparisons care about the encoding fairly silently
several options in the storyboard are flat out ignored
some xcode error messages are painfully non descriptive.
@NathanielD.Waggoner the lack of layouts makes UI non-composable
ARC can cause BAD_ACCESS exceptions and crash when optimized when declaring variables instead of re-using them
17:45
hmmm, maybe I just don't know how to reuse parts of views on iOS
haha
lol @ that error dave
thats amazing
NSData * descriptive_name (x8) causes a crash but NSData * temp_name (re-used x8) doesn't cause a crash
iOS didn't have anything like Android's implicit intents before iOS 8, and most apps still don't know about these App Extensions™
so, if you want to implement "share something to a social network", you must include a library for each of them
and write some code
in Android, this is just 5 lines of code and you are done
Maybe it's just because I like Android better and know Java more fluently but it takes me twice as long to implement the same thing in iOS vs Android
^ did you try RoboVM? it allows to use Java on iOS, too
but using native libraries is harder, though
17:48
I'll have to look into that but yeah it seems better to stick to objective C and pick up some swift
objective C isn't really the problem, it's the architecture of the system
Hey, anyone was this problem? I install an debug version of my app. If I start without the usb cable connected, I got the message: Waiting for debugger to connect" and the app never skip this screen.
swift is prety similar to Java, you won't have problems with it
You have to take more steps to do the same thing
yeah, the architecture of iOS sucks
@SargeBorsch did you use RoboVM yet?
17:48
I'm using it right now
but not for a long time yet
And it worth until now?
My lessons to learn swift are paused since swift has been released haha
I think, yes, but I'm not sure how hard is to use native libraries
or how hard is to use languages other than Java (Scala, for example)
Hum, i'll take a lot, I hope that they provide a trial license
but for the project I'm doing, Java 8 is fine
yes, they do
good to know, thanks
17:50
and if 15 days is too small, you can create another account (it's not the recommended way, though)
I did buy Solo license, because we decided that it's too late to change decisions
and so far it looks good
at least, better than Xamarin, because I don't have to use Xamarin Studio which is total crap
Well for who came from java world I think is a good shot, more comfortable
but all storyboard stuff you still need xcode right?
and using Java means that you can reuse code on Android and it would be totally native
Hey sarge can you create custom operators in Scala like ✈?
so Android doesn't become second class citizen
^ yes, I can
but it's not really good idea usually
the learning curve for objective C isn't really bad, you just basically use [ ] instead of .
17:54
with odd characters like that?
and it's not an operator
yes
otherwise it's basically c++
in Scala there's no operator overloading
you need to understand it
it just has methods, and methods allow infix notation
2 + 2 is the same as 2.+(2)
close enough
if you want something like real operator overloading, there's no easy way to have similar syntax, but semantically it is possible by using typeclass pattern
17:56
I want to try some crazy pictogram programming
if you want to see some real code with weird characters, check out scalaz
hmmm… no
looks like they are not using them anymore
but this is funny anyway
cool, huh?
so abstract
I want to do something like ✎✈
which would draw an airplane :D
that will the command to run my WTC simulation
minus the death to jews part
@SargeBorsch Compiles into FaceTime
isn't it a good candidate to control a drum machine?
Probably
it'd be nice if you could set the keyboard label/icon digitally though
@chronotrigga you don't meet the room requirements.
18:51
posted on April 28, 2015 by Reto Meier

Posted by Ian Lake, Developer Advocate Today, we’re excited to give you new tools to build better apps with the rollout of Google Play services 7.3. With new Android Wear APIs, the addition of nutrition data to Google Fit, improvements to retrieving the user’s activity and location, and better support for optional APIs, there’s a lot to explore in this release. Android Wear Google Play s

Semester done!
Passing grades pending, four classes to go!
\o/
Congrats :D working on my thesis hope to finish till july too :P
19:13
@DaveS this[] is more ugly than this.
So... did you pass?
I hope so. The last one was the hardest. :/
play services update to v23 downloading at 20kbps
will finish in version 24
19:33
user image
6
It was loading so slowly, I didn't think he was ever going to make it to the water. Glad things worked out for him
youtube stopped playing videos in Firefox. is it just me?
@Tarson you don't yet meet the criteria for the room --> room-15.github.io
Give some more outstanding answers first
I wouldn't know, I haven't used firefox in years.
19:41
@netpork That made me a little bit happy, just what I needed.
So from what I understand, one of the best ways to test your app is to have a test class for each activity. What's the best way to test an intent, and make sure you can switch from activity to activity okay? Should you test that?
it is called an integration test
Oh, so it's like a step up from unit testing, right?
@nana that splash is epic
Ha, found a small mistake in the Android docs.
19:53
yeah integration is integrating the units ;)
Thanks, Eski.
It makes sense, but sometimes it's hard to see the difference in specific test cases. As far as organization goes, should unit tests/integration tests be kept in different files, or should I just annotate them accordingly?
They should be different files at least
@jyoon I agree with you except it's [this someMethod] vs this.someMethod
20:02
^They're not always that simple though lol
unit test classes tend to mirror your app classes, but integration tests won't
So for a specific example, let's say I have a listview and I want to make sure long clicking it displays the contextual action bar. Is that an integration test at that point, or is it still a unit test? The only reason I think it could be considered integration is because it brings two things together, the listview item and the menu.
I just use the compilation test, did it compile? yes? ship it!
2
Guys anyone knows how from a given normal distribution table (with only the first 2 digits), to calculate an estimation of 3 digits? For example to calculate the P(z<0.123). For having only 2 digits (like P(z<0.12)) the answer is simple enough, but I can't understand how to calculate for the extra digit..
I'd call it a functional test
20:06
That makes sense too.
a unit test is way more fine grained than clicking a list view
A unit test would be something more like verifying the listview is inflated, and on screen?
@DaveS And if not?
add semicolons
hahaha
I wouldn't use unit testing for something like that
I would use it for verifying your code is logically correct
keep the UI out of it
20:09
Okay.
that is for functional testing with something like espresso
This doesn't match half of what I'm reading from the developers page.
what are you reading?
@Try_me34 you weight the rounded up and rounded down values, look at #4 in this link
Like here, about unit testing, they're talking about UI and verifying activities start: developer.android.com/training/activity-testing/…
But they also seem to jump from unit tests to functional tests, so maybe they're blurring the line between unit and integration?
I'm just gonna go to Dave's compilation test. Much faster, too.
lol
I can try to explain
agreed, the only solution for developers who embrace agile development
I know, I'm kidding. And I thoroughly appreciate your help. I'm sorry I'm just not grasping it.
I do think those are bad examples of unit tests by google
20:15
Unit testing == Does every method in my class return the expected result given a variety of inputs. Integration testing == Given some standard input do many classes/modules work as expected
I might just need to find someone who has testing experience and sit down with my actual app and build a few test cases, because having concrete examples (especially with something I made) helps a lot better.
is it on github?
@DaveS thank you so much
Yes. Let me fix up some of my shitty code so you don't go blind and I'll give you the link.
lol ok
20:16
@DaveS my teacher wrote the result instant without explaining.....
an example from a previous project: Unit Test: Does method "checkOut" return a copy of the data. Integration test: Given some data fed into our software do we get the expected classification from our learning algorithm.
np try
ok, I'll give you an example of a unit test
I know you don't expect it to be perfect, but it might be a little buggy as I'm still fooling around with tablet layouts.
Okay cool
it doesn't matter for purpose of an example test
haha i know. I'm very self conscious about my code ;P
20:23
one tip is to use a util package instead of a Utility class
Noted
with smaller more focused utility classes inside, otherwise the Utility class will become gigantic and you won't be able to find anything
Yeah, I felt those methods were better in a Utility class for ease of organization. I'll look into it.
I separate out java utils from android utils as well in case I want to reuse stuff for pure java
We use robolectric here so I'm trying to figure out how to do this the new way
What's bad about roboelectric?
20:29
it is hard to get it to work with espresso
the gradle tasks conflict with each other and stuff
Ah.
I liked the few things I did in espresso, I'm just trying to make sure I do them right.
espresso's very powerful
I used it a lot when I was making an app for ambulances
we use calabash here though which is awful :(
Lol well I appreciate all of your dos/donts
20:48
It was taking me too long to try and setup on my version of AS, but that should give you an idea
Typically with unit tests you will test some normal cases, and then all the possible boundary conditions or strange cases
Thanks, Eski. That's a good idea. Do you have ideas of what some of the activity tests should be?
I would do that with espresso, and run through the various use cases of your app
Okay.
I've done some of that already, thankfully.
try to figure out situations that will break it ;)
Haha, my app doesn't break ;P
20:56
In test driven development you write your tests first, and then the development part is making it so your tests don't fail
Yeah, I should try and proceed more with that approach. A lot of my friends have been taught that in their classes, but my Java professor wasn't like that.
how to test something that doesn't exist?
it is more useful in a commercial software environment
stubs Sarge
black box testing, etc..
isn't it a lot of additional work?
Aha, I found something I did not prepare for. Good work, Eski.
20:59
Well it is necessary when you make software telling ambulances what to do ;)
yeah
and launching nuclear missiles
It can also make life easier as you go
you can know instantly when your changes break existing tests
yes, that sounds cool
I hope I will at some time try it seriously
What would you do to prevent the passing of a negative number to a NumberFormat object? Just curious what your opinion is on that one, because I imagine it all depends on business logic.
for now, there's always not enough time and I need to be the cowboy programmer
21:01
Yeah McAdam
depends on the situation and may be a business logic decision
I mean, it shouldn't happen in my app, I don't really want to display negative numbers.
But I guess one day I might? So maybe I should just leave it?
I'll think about it, don't worry about it lol.
Even if you don't do test driven development for the initial product development, it is great for bug fixes
Yeah. Well, this is an app I'm doing on my own, so I have no deadline. That being said, I have every intention of doing the best I can first, and in a way that will help me improve it in the future. Because I know it won't be perfect when I release it.
Reproduce the bug in an automated test, and then you don't have to reproduce it manually every time you want to test/debug as you are fixing it.
2
Quick question, any free chroma key video editing software recommendations?
21:07
Smart. I really appreciate all your help. I'm gonna write some unit tests based on your suggestions and then I'll send you a gist if you don't mind skimming and making sure I'm not the right track.
Sure, happy to help
What is an edge case for a date? The date class should handle inavlid dates like 02/31 and such, right?
aaaand it comes full circle: regular-expressions.info/dates.html
@TristanWiley use ultra key at premiere, super easy. Go @ settings with choosing aggresive
a nonexistent date
a date before the year 0
21:19
Yeah, the date class handles that. I can't say new LocalDate(2015, 04, 31) because the date class throws an exception.
@Try_ free?
@TristanWiley check this out. I think its free in piratebay
Yeah, I
'm too lazy to crack things
for a school project
you can go trial mode
But I am not aware of any other fast tool out there
> New to Javascript and Android Dev, Thank you!
21:25
?
Usually when you drop in without any context it's to reject someone. ;P
Oh lol.
cM, bookmark this for linking later
37
Q: Why is JavaScript called JavaScript, since it has nothing to do with Java?

MatthewSince JavaScript is not derived from Java, why does it have "Java" in the name?

good call. thanks
Wait...where's my bookmarking star? Someone stole it. It's not there
When anyone starts saying JavaScript I'm going to start correcting them and say, do you mean ECMAScript? #endTheConfusion
21:38
no, they mean JScript
Wait! hold on!, I want to steal the other two answers and commented answer and post it as my own too! — Dave S 56 secs ago
#IEforever
haha, Dave! Just read that
Restarting my browser to see if I can find my star
I ate your star, it was delicious.
^ found it
21:39
Dave, that's just the wrapper
you can see, the interior is gone, because I ate it.
lol
crushing dreams and eating stars #OldLyfe
#beardPower
damn it, people! How dare you joke at a time like this
But that was funny
🌟✰✪✩⍟☆★⋆
Don't get indigestion Carl, if you eat all those we'll only be left with ✡
@eski when you're testing for an exception, do you use ExpectedException? Or do you annotate the test?
21:45
I've never used that, seems like you could though if you want your test to throw an exception to pass
I can't get that to work.
Even though the stacktrace shows the exception I'm expecting is being thrown.
just wrap your test in a try catch and only return True if the Catch myExpectedException block is entered?
Sure, but I assumed that was bad practice?
would need a new test though
yeah it would be
I'd try to get Expected exception to work
21:49
It's probably something really stupid.
I'm trying to follow this:
500
Q: How do you assert that a certain exception is thrown in JUnit 4 tests?

SCdFHow can I use JUnit4 idiomatically to test that some code throws an exception? While I can certainly do something like this: @Test public void testFooThrowsIndexOutOfBoundsException() { boolean thrown = false; try { foo.doStuff(); } catch (IndexOutOfBoundsException e) { thrown = ...

It's never bad practice to have working code
a lot of people forget that it seems like
Although I'm not 100% which version of JUnit this is using and maybe that's my problem.
yeah that could be it
Yeah, based on the stacktrace this is JUnit 3. Whoops.
I'm an idiot.
5
You're in good company, looks at @codeMagic
21:53
^
Shots fired.
anytime someone says they're an idiot we've gotta star it up
I'll keep that in mind when I need more.
Overkill? Not enough? On the right track? gist.github.com/AdamMc331/dccc3d38942ac6667b6f

« first day (1655 days earlier)      last day (3522 days later) »