« first day (326 days earlier)      last day (3241 days later) » 

12:00 AM
RELOAD!
[Cardshifter/Cardshifter] 2 closed issues.
[Hosch250/ResxEditor] 10 commits. 170 additions. 5086 deletions.
[rubberduck-vba/Rubberduck] 1 commit. 136 additions. 63 deletions.
[Zomis/Duga] 23 commits. 1 opened issue. 1 issue comment. 511 additions. 183 deletions.
Saved Cardshifter/Cardshifter
Saved Hosch250/ResxEditor
Saved rubberduck-vba/Rubberduck
Saved Vannevelj/RoslynTester
Saved Vannevelj/VSDiagnostics
Saved Vogel612/TranslationHelper
Saved Zomis/Duga
Saved Zomis/Rubberduck
Saved Zomis/test
 
 
10 hours later…
10:19 AM
hey
 
posted on June 24, 2015 by Guillaume Laforge

Yesterday, I had the pleasure to speak about Groovy on Android at the Paris Android User Group. This is an evolution of my presentation from the DroidCon 2014 conference, with a few updates, in particular more coverage of SwissKnife.

 
@SimonAndréForsberg If that wasn't rhetorical, it's because it's a code block ;)
Still doesn't make sense though
So... there's currently two blocker issues before I can start my project
1) I intend it to be an inventory management system right now, but it could grow into a bigger system that also includes accounting, I need a damn name for it that covers both!
2) I need to figure out an OpenSource license that forbids commercial gains by using the project
 
@skiwi I thought you wanted it to be used?
 
@SimonAndréForsberg I've got some private users already, and I'm figuring out the possibilities of hosting it as a Cloud Service in the future
I'm not against people installing it on their own servers via the repository directly
I'm mostly worried about some other group either incorporating this project into a bigger one and selling it, or someone else building a similar cloud service
If I have a license that forbids it, then I at least have legal grounds if I ever need to have them
 
@skiwi I don't think that you really need to worry about that.
 
10:31 AM
Well, if it all it takes is to include a license in the repo, then that can't be too hard
 
You have zero lines of code and you are worrying about people using it for commercial purposes?
 
@SimonAndréForsberg Yes, because I think it's a good idea to include it
(The license)
Even JDOM has one
 
It is a good idea to include it, but JDOM has a bit more than 0 zero lines of code.
 
@SimonAndréForsberg True... I'll put it on hold then
The name is more pressing
I could go with SimpleInventoryManagementSystem
but it's a bit long
 
I had a project name "FiveXFive" for quite a while, then later it was renamed and became "Pentacolor" (and it is still not entirely finished)
@skiwi SIMS
 
10:40 AM
@SimonAndréForsberg Well, I'd rather not call it SIMS :P
 
Skiwi IMS?
 
This is the issue, I think about a name and immediately kill it :(
Thinking about it... What's wrong with InventoryManagementSystem
Except inventory management systems do not necessarily track the prices of products when buying/selling
 
PriceInventoryManagemantSystem? PIMS? Or just PIM?
 
I'm getting a feeling... I think it should end on Tracker, and it tracks buying/selling things
 
Price Inventory Tracker ?
 
10:47 AM
I think Price is the wrong direction
maybe I'm going back to AccountancySoftware, but that's very broad
I might as well name it BusinessSoftware then, but that doesn't say anything
 
Why do I have a feeling I will sit here and listen to @skiwi all day?
 
@SimonAndréForsberg Because I'm having that feeling too
 
Honestly, I don't want to sit here and listen to you naming things all day :)
 
That's okay
I just need some bright spark in my head
Preferably not a lightning strike, that would be too much
 
11:24 AM
#CodeReview Moderator Elections starting on Monday - Full graduation 1 step closer: http://meta.codereview.stackexchange.com/q/5504/31503?stw=2
 
@skiwi i really think you should try designing and writing code at the same time :) sometimes the results are ugly, but refactoring is easy, and you get a lot done fast
2
 
@bazola You do need to know what you want to make though
 
@skiwi what you want to make might change over time. Really.
 
12:09 PM
[skiwi2/BusinessSoftware] Ping: Anything added dilutes everything else.
 
1:05 PM
Where's all the commits at?
 
1:38 PM
 
@SimonAndréForsberg Around by chance?
What should I do with line endings
Git replaced LF with CRLF and IntelliJ complains that it has \n in that file and that the project default is \r\n
 
2:01 PM
[skiwi2/BusinessSoftware] skiwi2 pushed commit 0828fa2b to develop: Added .gitignore and initialized Gradle build tool.
 
@SimonAndréForsberg @Duga is being... slow?
 
@skiwi sounds like you have a pretty good idea of what you want to make :)
 
But unfortunately there's no industry-coined name for such thing
 
sounds like you are working on something like QuickBooks to me
 
Monking
 
2:06 PM
hey @Phrancis
@bazola I don't know, I don't know that one
Eh, oops, that was a double hey
 
hey hey
 
@Phrancis, may I ask what you currently use for your PsychoProductions to track all income/expenses?
 
Pen and paper ;)
 
@skiwi probably the biggest software company in america, but i don't have the numbers offhand
 
No, really, right now a spreadsheet is sufficient
 
2:11 PM
@Phrancis Are you interested in using this application and being a beta user? ;)
 
I've made a DBMS schema for it, but I don't have any kind of front-end
@skiwi Sure, as long as it can accommodate my needs
 
@Phrancis I'm trying to make it configurable, etc.
I'm now figuring out how to setup my project with Groovy and Grails
This also remembers me what I like so much about not programming for a few days ;)
:|
 
@skiwi there are probably a lot of different accounting software programs, so if it were me I would go look at a bunch of them to see how they make things configurable. one thing about crazy big software like QuickBooks is that it integrates directly with your bank account and downloads transactions that way. takes forever to learn to use the software correctly though
and also i believe there are concrete theories about accounting, as far as what accounts receivable and accounts payable means, and what your company register is, etc etc, so i would look at accounting theory too
 
I can make a dumbed-down version first :P
And then see if I can make it look professional
 
2:33 PM
@skiwi I don't know how much you will find this helpful, but here is the schema I made for my own business:
11
Q: Revision 2 - Step 1: PsychoProductions management tool project

PhrancisThis is another revision of my Psycho Productions database, this time refactored from MySQL to PostgreSQL, after I found out about some of the shortcomings of MySQL. The following is a (simplified) version of relationships in a flowchart. The way I used arrows is: where the arrow originates = F...

 
Yours seems to be only focused on the sending invoices part though, interesting
 
Well, not only, but it is an important part
 
We should talk about the interesting parts on Skype ;)
 
The business flow typically goes something like this:
1) A Person (e.g., partner studio, new customer, etc.) requests Product(s) (existing or new)
2) The Product(s) are added to a Quote
3) Once the job is done, the Quote becomes an Invoice
4) The Invoice is billed, and marked paid once payment is secured
 
2:51 PM
@Phrancis I'm afraid most of it is not in the scope currently
It will be interesting though if I can fit it in in a good way
 
I should just learn to use Swing and make a simple GUI
3
I'm sure @Simon has a Java-pgSQL DB connector somewhere I could look at for inspiration :)
 
@Phrancis Or JavaFX 8...
Though, even better
Stay away from anything related to Java for GUIs and make a website
 
3:12 PM
@Phrancis why Swing when you can do libGDX?
 
You probably don't want libGDX for a business application, or would you?
 
[skiwi2/BusinessSoftware] skiwi2 pushed commit c6c2acef to develop: Initialized Gradle application.
 
@skiwi i thought everyone hated swing though?
at least with libGDX you have built in table layouts
 
@bazola Swing is pretty decent, but I'd call it old
I personally like the direction of websites waaay more than Swing/JavaFX for business applications
 
3:35 PM
@skiwi I'm sure there are a lot of businesses that would be uncomfortable having their transaction information online or in the cloud, though
even if it were totally secure, there are lots of paranoid people
i just learned this trick yesterday to get the highest of 3 integers:
int highestAmount = Math.max(resLevel, Math.max(comLevel, indLevel));
 
@bazola Isn't libGDX kind of overkill for simple user forms to append and retrieve data from SQL?
 
@bazola It's just the internal company network
Great, Grails is now already givign me errors
 
@Phrancis for Swing i believe you are going to have to manually code the positions of all of the elements
i don't know if it has tables or not, but if not, libGDX is probably easier to program from a GUI perspective
aaaaaand its working:
 
Ah ok
 
3:47 PM
@bazola Can you write a DB connector directly in the GDX code?
 
@bazola Swing is waaay easier for business applications
Game GUIs are always a pain to make
 
@Phrancis i would think that either Java has stuff for SQL, or there are libraries you can import
 
@bazola Looking nice
 
@skiwi thanks, I still hate that I don't have icons for the buttons on the left, but i hate making graphics
 
@bazola Pick your poison :)
 
3:49 PM
@skiwi I've never used it so i don't know, but i guess it has something for laying out tables of stuff?
 
@bazola Yes, there's lots of support for it
It'll be Excel-style though, but that's what business applications usually want
 
swing is built in as well, correct?
 
well i guess Swing is good enough then ;)
 
Ugh, My JAVA_HOME was wrongly set to JDK 8u20 instead of 8u40
I'd want to recommend JavaFX 8, but it's also harder to learn
 
4:03 PM
> > Configuring > 0/1 projects > root project > Resolving dependencies ':classpath

FAILURE: Build failed with an exception.

* What went wrong:
Task 'bootRun' not found in root project 'BusinessSoftware'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option
to get the stack trace. Run with -
-info
or -
-debug
option to get more log output.
-_-
 
did you create a bootRun task?
 
No
But I see a bigger issue
I have no build.gradle file
 
hehe
 
And that's why you never ignore errors
 
4:18 PM
[skiwi2/BusinessSoftware] skiwi2 pushed commit 783bfa76 to develop: Added missing build.gradle.
 
IT WORKS!
2
 
 
1 hour later…
5:29 PM
@SimonAndréForsberg Would I put application logic in grails-app/domain or src/main/groovy?
Grails doesn't seem easy
But does seem easier than Java/Spring/Hibernate
Oh right grails-app/domain is for domain objects
 
 
2 hours later…
7:48 PM
man they really hate libGDX over in the game dev chatroom
 
Bah, they probably hate it because Minecraft is not made using libGDX.
 
its all about unity over there
i guess everyone wants to promote what they use so that more people use it
 
@bazola That game dev chatroom is a joke as far as I've been there
 
some of those guys work as professional game devs though
 
Anyone here played around with Groovy/Grails?
 
8:04 PM
Simon has for Duga
 
But he's not around :( And I'm stuck
 
Try Stack Overflow?
 
Meh, who wants to go to the depths of StackOverflow?
 
You, apparently
 
Rather not
 
8:09 PM
I don't go to SO when I want to, I go when I need to ;)
public class Prepared {

    public static void main(String[] args) {

        Connection con = null;
        PreparedStatement pst = null;

        String url = "jdbc:postgresql://localhost/testdb";
        String user = "user12";
        String password = "34klq*";
Is there a better way of doing this? I really don't like username and password to be directly in the code...
Could I perhaps use java.util.Scanner to ask for console input?
(PS: this is example code from a tutorial, not my actual credentials)
 
use a properties file...
 
Wouldn't that also be in the code base, though?
(say if it were on git or such)
 
sure, but it'd not be in the source code
and if you're on git, there's tools for that:
^ coming from SE !
alternatively you commit the template and make the user responsible for actually using it to create the props file, see github.com/Unihedro/JavaBot
 
OK. I guess I could also just use Swing to make a pop-up box asking for user name and password, and pass that into the sqlconnection too?
 
yes, sure..
whatever works for you.
 
8:22 PM
OK cool
 
don't log them, though...
 
Good advice
 
8:35 PM
Aaargh, you've got to be kidding me
So GORM does not throw an error by default if validation fails?! It just returns null
 
8:46 PM
[skiwi2/BusinessSoftware] skiwi2 pushed commit 87761dce to develop: Set grails.gorm.failOnError to true by default.
[skiwi2/BusinessSoftware] skiwi2 pushed commit 8ca607e9 to develop: Added User domain object.
 
@Vogel612 What's the point of not flushing in Hibernate when saving?
 
beats me... has been to long.
did you smoke the manual on what flushing does?
 
@Vogel612 Partly
    def "email should be unique"() {
        when: "twice same email"
        def user = new User(email: "test@test.com", password: "test")
        def user2 = new User(email: "test@test.com", password: "test")

        then: "saving should fail"
        user.save(flush: true)
        !user2.save(failOnError: false)
    }
In this case I need to flush, or else the second save won't put up an error
Shouldn't you then always be flushing if you have unique fields?
 
9:10 PM
Ugh2
> The downside is that you have to deal with this exception if you have highly concurrent writes.
Are they there saying that if you don't deal with it on low concurrent writes you might randomly run occasionally into errors?
 
yes they are.
can I say that they suck?
please?
 
Yes
Because I think it sucks
I don't have time right now, but I think anyware.co.uk/2005/2012/11/12/… is an interesting read
 
9:40 PM
@skiwi Wait, you can define a string literal as a variable or function name in Groovy?
def "email should be unique"() {
So weird
 
it does seem weird to me as well
 
10:36 PM
Home
 
10:48 PM
I think I'm gonna try to make a database connector
Oh wow.
import groovy.sql.Sql

def dbUrl      = "jdbc:postgresql://localhost/test-db"
def dbUser     = "test"
def dbPassword = "test"
def dbDriver   = "org.postgresql.Driver"

def sql = Sql.newInstance(dbUrl, dbUser, dbPassword, dbDriver)
That's it!?!?
 
11:17 PM
Groovy can do Swing too!?!
import groovy.swing.SwingBuilder
import java.awt.BorderLayout as BL

count = 0
new SwingBuilder().edt {
  frame(title: 'Frame', size: [300, 300], show: true) {
    borderLayout()
    textlabel = label(text: 'Click the button!', constraints: BL.NORTH)
    button(text:'Click Me',
         actionPerformed: {count++; textlabel.text = "Clicked ${count} time(s)."; println "clicked"}, constraints:BL.SOUTH)
  }
}
What's edt?
 
11:45 PM
200_success vs. rolfl: 334 diff. Year: -384. Quarter: -242. Month: +247. Week: +130. Day: +170.
Mat's Mug vs. Simon André Forsberg: 440 diff. Year: +1381. Quarter: +2131. Month: +785. Week: +505. Day: +410.
200_success vs. janos: 17179 diff. Year: -2436. Quarter: -1492. Month: -2266. Week: -35. Day: +95.
Loki Astari vs. Simon André Forsberg: 4056 diff. Year: -1685. Quarter: -386. Month: -322. Week: -70. Day: +35.
 

« first day (326 days earlier)      last day (3241 days later) »