Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #39227 > unrolled thread

How bad i are my coding skills?

Started bychad altenburg <cdalten@gmail.com>
First post2019-12-26 14:46 -0800
Last post2020-01-05 18:00 +0100
Articles 12 on this page of 32 — 6 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2019-12-26 14:46 -0800
    Re: How bad i are my coding skills? Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-12-27 09:28 -0500
      Re: How bad i are my coding skills? Eric Douglas <e.d.programmer@gmail.com> - 2019-12-27 08:13 -0800
        Re: How bad i are my coding skills? Arne Vajhøj <arne@vajhoej.dk> - 2019-12-27 13:11 -0500
        Re: How bad i are my coding skills? Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-12-27 13:33 -0500
          Re: How bad i are my coding skills? Arne Vajhøj <arne@vajhoej.dk> - 2019-12-27 13:47 -0500
            Re: How bad i are my coding skills? Eric Douglas <e.d.programmer@gmail.com> - 2019-12-27 11:14 -0800
              Re: How bad i are my coding skills? Arne Vajhøj <arne@vajhoej.dk> - 2019-12-27 16:09 -0500
                Re: How bad i are my coding skills? Martin Gregorie <martin@mydomain.invalid> - 2019-12-27 23:10 +0000
                  Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2019-12-27 16:58 -0800
        Re: How bad i are my coding skills? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2019-12-30 01:27 +0100
        Re: How bad i are my coding skills? Arne Vajhøj <arne@vajhoej.dk> - 2019-12-29 19:34 -0500
          Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2019-12-30 05:13 -0800
            Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2019-12-30 05:46 -0800
              Re: How bad i are my coding skills? Martin Gregorie <martin@mydomain.invalid> - 2019-12-30 14:48 +0000
              Re: How bad i are my coding skills? Arne Vajhøj <arne@vajhoej.dk> - 2019-12-30 15:11 -0500
                Re: How bad i are my coding skills? Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-12-30 15:55 -0500
                  Re: How bad i are my coding skills? Arne Vajhøj <arne@vajhoej.dk> - 2019-12-30 18:51 -0500
                    Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2019-12-31 05:10 -0800
              Re: How bad i are my coding skills? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-01-02 04:20 +0100
            Re: How bad i are my coding skills? Eric Sosman <esosman@comcast-dot-net.invalid> - 2019-12-30 08:51 -0500
              Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2019-12-30 10:25 -0800
    Re: How bad i are my coding skills? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2019-12-30 01:25 +0100
      Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2019-12-30 05:07 -0800
        Re: How bad i are my coding skills? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-01-02 04:27 +0100
          Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2020-01-02 05:46 -0800
            Re: How bad i are my coding skills? Eric Sosman <esosman@comcast-dot-net.invalid> - 2020-01-02 10:43 -0500
              Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2020-01-03 04:54 -0800
                Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2020-01-03 05:00 -0800
                  Re: How bad i are my coding skills? Eric Sosman <esosman@comcast-dot-net.invalid> - 2020-01-03 11:05 -0500
                    Re: How bad i are my coding skills? chad altenburg <cdalten@gmail.com> - 2020-01-03 13:54 -0800
                Re: How bad i are my coding skills? Daniele Futtorovic <da.futt.news@laposte-dot-net.invalid> - 2020-01-05 18:00 +0100

Page 2 of 2 — ← Prev page 1 [2]


#39245

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2019-12-30 08:51 -0500
Message-ID<qucvdf$obj$1@dont-email.me>
In reply to#39243
On 12/30/2019 8:13 AM, chad altenburg wrote:
> [...] Internally, the data has the format like
> 
> [StartHour, StartMinute, StartAmOrPm, EndHour, EndMinute, EndAmOrPm]

     Unless there's some overriding reason to retain this complexity
(that may be; I have only a vague notion of what your app does), I'd
suggest simplifying this to two java.util.Date objects, or even to
two long's (milliseconds since zero).  Comparisons, arithmetic,
adjustments, ... will all be easier if an Interval is described by
a pair of data items than by a sextet.  You can easily convert
between the internal and external representations as needed, while
simplifying a lot of the internal manipulations.

> Now what happens say I want to add a flag to switch this data because I want to take the day off. Yes, I can clear the data. But I would still need an additional piece of data added to this format so when if I traverse of this list, the app knows to do whatever when it sees the "day off" flag.

     Again I'm not 100% clear on what you're trying to do, but it seems
to me that the Interval should be mostly independent of its associated
flags and statuses and things.  Perhaps (only "perhaps") what you want
is a Map<Interval,Status> or Map<Interval,Set<Flag>>, or maybe just

	List<Interval> busy = ...
	List<Interval> idle = ...
	List<Interval> awol = ...
	...

-- 
esosman@comcast-dot-net.invalid
Three hundred eighty-seven days to go.

[toc] | [prev] | [next] | [standalone]


#39247

Fromchad altenburg <cdalten@gmail.com>
Date2019-12-30 10:25 -0800
Message-ID<997f923a-cad5-46ea-8e01-63908cb1cf47@googlegroups.com>
In reply to#39245
On Monday, December 30, 2019 at 5:51:52 AM UTC-8, Eric Sosman wrote:
> On 12/30/2019 8:13 AM, chad altenburg wrote:
> > [...] Internally, the data has the format like
> > 
> > [StartHour, StartMinute, StartAmOrPm, EndHour, EndMinute, EndAmOrPm]
> 
>      Unless there's some overriding reason to retain this complexity
> (that may be; I have only a vague notion of what your app does), I'd
> suggest simplifying this to two java.util.Date objects, or even to
> two long's (milliseconds since zero).  Comparisons, arithmetic,
> adjustments, ... will all be easier if an Interval is described by
> a pair of data items than by a sextet.  You can easily convert
> between the internal and external representations as needed, while
> simplifying a lot of the internal manipulations.
> 
> > Now what happens say I want to add a flag to switch this data because I want to take the day off. Yes, I can clear the data. But I would still need an additional piece of data added to this format so when if I traverse of this list, the app knows to do whatever when it sees the "day off" flag.
> 
>      Again I'm not 100% clear on what you're trying to do, but it seems
> to me that the Interval should be mostly independent of its associated
> flags and statuses and things.  Perhaps (only "perhaps") what you want
> is a Map<Interval,Status> or Map<Interval,Set<Flag>>, or maybe just
> 
> 	List<Interval> busy = ...
> 	List<Interval> idle = ...
> 	List<Interval> awol = ...
> 	...
> 
> -- 
Here are two screenshots. I use the data format to feed both of these GUIs..

https://github.com/cdalten/WorkReminder/blob/master/Screenshot_2019-06-17-12-44-24%20(1).png

https://github.com/cdalten/WorkReminder/blob/master/Screenshot_2019-06-17-12-44-33.png

[toc] | [prev] | [next] | [standalone]


#39239

FromDaniele Futtorovic <da.futt.news@laposte-dot-net.invalid>
Date2019-12-30 01:25 +0100
Message-ID<qubg69$1q3$1@dont-email.me>
In reply to#39227
On 2019-12-26 23:46, chad altenburg wrote:
> I wrote my first Java based app for the Android smartphone. This was done by myself. Here are the stats for my first app...
> 
> 1)Spending 10 hrs a week on it, it has taken me 20 months to get 95% if it complete.
> 
> 2)During this time I rewrote parts of it twice. I also did a few optimizations during this process.
> 
> 3)The Java code itself almost 6000 lines.
> 
> 4)I found and corrected almost 120 bugs. These were mainly off by one and memory leaks.
> 
> 
> And all of this was done while charging my phone at Starbucks and drinking Coffee between the hrs of 6am to 8am, M-F.
> 

What does the app do?

Do you like it?

-- 
DF.

[toc] | [prev] | [next] | [standalone]


#39242

Fromchad altenburg <cdalten@gmail.com>
Date2019-12-30 05:07 -0800
Message-ID<ba4b6d86-c8d3-4a94-95f6-6408bb1b23b0@googlegroups.com>
In reply to#39239
On Sunday, December 29, 2019 at 4:25:53 PM UTC-8, Daniele Futtorovic wrote:
> On 2019-12-26 23:46, chad altenburg wrote:
> > I wrote my first Java based app for the Android smartphone. This was done by myself. Here are the stats for my first app...
> > 
> > 1)Spending 10 hrs a week on it, it has taken me 20 months to get 95% if it complete.
> > 
> > 2)During this time I rewrote parts of it twice. I also did a few optimizations during this process.
> > 
> > 3)The Java code itself almost 6000 lines.
> > 
> > 4)I found and corrected almost 120 bugs. These were mainly off by one and memory leaks.
> > 
> > 
> > And all of this was done while charging my phone at Starbucks and drinking Coffee between the hrs of 6am to 8am, M-F.
> > 
> 
> What does the app do?
>

It automatically logs into my employer's website and then tells me when I have to work next. From there, based on when I work next, the phone will automatically set the alarm on my phone.
 
And this isn't a trivial task either. For example, if I have to be into work on Friday night at midnight, and I want to have my alarm automatically set an hour before my shift, the alarm will have to be set for Thursday night. In other words, it has done be done the day before. It also has change from AM to PM since 12 AM represents midnight on my phone. But 11 at night is PM.

The other winner is if I want to say switch shifts with another person. There is no way I can change the schedule once it's posted online because it's already be done for the week. So the question becomes how do I go about doing this? It's possible, but it's a kind of hard task.

> Do you like it?

Yeah, because it does what it's supposed to do.
> 
> -- 

[toc] | [prev] | [next] | [standalone]


#39262

FromDaniele Futtorovic <da.futt.news@laposte-dot-net.invalid>
Date2020-01-02 04:27 +0100
Message-ID<qujnv4$qo9$1@dont-email.me>
In reply to#39242
On 2019-12-30 14:07, chad altenburg wrote:
> On Sunday, December 29, 2019 at 4:25:53 PM UTC-8, Daniele Futtorovic wrote:
>> On 2019-12-26 23:46, chad altenburg wrote:
>>> I wrote my first Java based app for the Android smartphone. This was done by myself. Here are the stats for my first app...
>>>
>>> 1)Spending 10 hrs a week on it, it has taken me 20 months to get 95% if it complete.
> 
> It automatically logs into my employer's website and then tells me when I have to work next. From there, based on when I work next, the phone will automatically set the alarm on my phone.
>  
> And this isn't a trivial task either. >
>> Do you like it?
> 
> Yeah, because it does what it's supposed to do.

That's pretty cool. Out of curiosity, have you tried asking your
employer to set up a scheduling system with notifications?

-- 

[toc] | [prev] | [next] | [standalone]


#39263

Fromchad altenburg <cdalten@gmail.com>
Date2020-01-02 05:46 -0800
Message-ID<724066a4-6567-4379-a950-95cb0656418e@googlegroups.com>
In reply to#39262
On Wednesday, January 1, 2020 at 7:27:41 PM UTC-8, Daniele Futtorovic wrote:
> On 2019-12-30 14:07, chad altenburg wrote:
> > On Sunday, December 29, 2019 at 4:25:53 PM UTC-8, Daniele Futtorovic wrote:
> >> On 2019-12-26 23:46, chad altenburg wrote:
> >>> I wrote my first Java based app for the Android smartphone. This was done by myself. Here are the stats for my first app...
> >>>
> >>> 1)Spending 10 hrs a week on it, it has taken me 20 months to get 95% if it complete.
> > 
> > It automatically logs into my employer's website and then tells me when I have to work next. From there, based on when I work next, the phone will automatically set the alarm on my phone.
> >  
> > And this isn't a trivial task either. >
> >> Do you like it?
> > 
> > Yeah, because it does what it's supposed to do.
> 
> That's pretty cool. Out of curiosity, have you tried asking your
> employer to set up a scheduling system with notifications?
> 

Nah, because my smartphone has a built is scheduling system with notifications already.

[toc] | [prev] | [next] | [standalone]


#39264

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2020-01-02 10:43 -0500
Message-ID<qul32p$84p$1@dont-email.me>
In reply to#39263
On 1/2/2020 8:46 AM, chad altenburg wrote:
> On Wednesday, January 1, 2020 at 7:27:41 PM UTC-8, Daniele Futtorovic wrote:
>> [...]
>> That's pretty cool. Out of curiosity, have you tried asking your
>> employer to set up a scheduling system with notifications?
>>
> 
> Nah, because my smartphone has a built is scheduling system with notifications already.

     ... which almost certainly provides iCalendar import/export.

	https://en.wikipedia.org/wiki/ICalendar

-- 
esosman@comcast-dot-net.invalid
Three hundred eighty-four days to go.

[toc] | [prev] | [next] | [standalone]


#39266

Fromchad altenburg <cdalten@gmail.com>
Date2020-01-03 04:54 -0800
Message-ID<87352620-9653-47c1-8b6c-8399e2dcb251@googlegroups.com>
In reply to#39264
On Thursday, January 2, 2020 at 7:43:29 AM UTC-8, Eric Sosman wrote:
> On 1/2/2020 8:46 AM, chad altenburg wrote:
> > On Wednesday, January 1, 2020 at 7:27:41 PM UTC-8, Daniele Futtorovic wrote:
> >> [...]
> >> That's pretty cool. Out of curiosity, have you tried asking your
> >> employer to set up a scheduling system with notifications?
> >>
> > 
> > Nah, because my smartphone has a built is scheduling system with notifications already.
> 
>      ... which almost certainly provides iCalendar import/export.
> 
> 	https://en.wikipedia.org/wiki/ICalendar
> 

I'll look at it this weekend. The reason why I used the built in scheduling system with notifications is because 

1)It's built into the Android smartphone. This means, since it's like native, then in theory, I should get better performance than using a non native tool that uses JavaScript to achieve the same magic.

2)I forgot what else. But a Physics major at UCLA made a similar comment when he saw my phone app.

[toc] | [prev] | [next] | [standalone]


#39267

Fromchad altenburg <cdalten@gmail.com>
Date2020-01-03 05:00 -0800
Message-ID<522f6d08-446f-406f-8b09-992ee1fa575a@googlegroups.com>
In reply to#39266
On Friday, January 3, 2020 at 4:55:10 AM UTC-8, chad altenburg wrote:
> On Thursday, January 2, 2020 at 7:43:29 AM UTC-8, Eric Sosman wrote:
> > On 1/2/2020 8:46 AM, chad altenburg wrote:
> > > On Wednesday, January 1, 2020 at 7:27:41 PM UTC-8, Daniele Futtorovic wrote:
> > >> [...]
> > >> That's pretty cool. Out of curiosity, have you tried asking your
> > >> employer to set up a scheduling system with notifications?
> > >>
> > > 
> > > Nah, because my smartphone has a built is scheduling system with notifications already.
> > 
> >      ... which almost certainly provides iCalendar import/export.
> > 
> > 	https://en.wikipedia.org/wiki/ICalendar
> > 
> 
> I'll look at it this weekend. The reason why I used the built in scheduling system with notifications is because 
> 
> 1)It's built into the Android smartphone. This means, since it's like native, then in theory, I should get better performance than using a non native tool that uses JavaScript to achieve the same magic.
> 
> 2)I forgot what else. But a Physics major at UCLA made a similar comment when he saw my phone app.

Okay, I took the bait and read the wiki article. I guess I don't understand the whole scheduling and notification thing because I'm not seeing the fundamental difference between the Android Notification/Job Scheduler and iCalendar. This is because on the surface they seem to do the exact same thing.

[toc] | [prev] | [next] | [standalone]


#39269

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2020-01-03 11:05 -0500
Message-ID<qunop7$a9k$1@dont-email.me>
In reply to#39267
On 1/3/2020 8:00 AM, chad altenburg wrote:
> On Friday, January 3, 2020 at 4:55:10 AM UTC-8, chad altenburg wrote:
>> On Thursday, January 2, 2020 at 7:43:29 AM UTC-8, Eric Sosman wrote:
>>> On 1/2/2020 8:46 AM, chad altenburg wrote:
>>>> On Wednesday, January 1, 2020 at 7:27:41 PM UTC-8, Daniele Futtorovic wrote:
>>>>> [...]
>>>>> That's pretty cool. Out of curiosity, have you tried asking your
>>>>> employer to set up a scheduling system with notifications?
>>>>>
>>>>
>>>> Nah, because my smartphone has a built is scheduling system with notifications already.
>>>
>>>       ... which almost certainly provides iCalendar import/export.
>>>
>>> 	https://en.wikipedia.org/wiki/ICalendar
>>>
>>
>> I'll look at it this weekend. The reason why I used the built in scheduling system with notifications is because
>>
>> 1)It's built into the Android smartphone. This means, since it's like native, then in theory, I should get better performance than using a non native tool that uses JavaScript to achieve the same magic.
>>
>> 2)I forgot what else. But a Physics major at UCLA made a similar comment when he saw my phone app.
> 
> Okay, I took the bait and read the wiki article. I guess I don't understand the whole scheduling and notification thing because I'm not seeing the fundamental difference between the Android Notification/Job Scheduler and iCalendar. This is because on the surface they seem to do the exact same thing.

     Here's the gist: iCalendar is a standard for communicating
descriptions of calendar events like appointments, work shifts,
baseball games, meetings with your parole officer, and so on.
The iCalendar standard is supported by lots and lots of systems,
almost certainly including the one built-in to your phone and
whatever your employer might deploy (or already have deployed).

     That is, if you follow Daniele Futtorovic's suggestion you
will very likely need to do little or no programming.

     (... unless I've misunderstood the goal, which is always a
possibility.)

-- 
esosman@comcast-dot-net.invalid
Three hundred eighty-three days to go.

[toc] | [prev] | [next] | [standalone]


#39271

Fromchad altenburg <cdalten@gmail.com>
Date2020-01-03 13:54 -0800
Message-ID<574a3004-0c83-4cc2-8ed4-107d179c505c@googlegroups.com>
In reply to#39269
On Friday, January 3, 2020 at 8:06:07 AM UTC-8, Eric Sosman wrote:
> On 1/3/2020 8:00 AM, chad altenburg wrote:
> > On Friday, January 3, 2020 at 4:55:10 AM UTC-8, chad altenburg wrote:
> >> On Thursday, January 2, 2020 at 7:43:29 AM UTC-8, Eric Sosman wrote:
> >>> On 1/2/2020 8:46 AM, chad altenburg wrote:
> >>>> On Wednesday, January 1, 2020 at 7:27:41 PM UTC-8, Daniele Futtorovic wrote:
> >>>>> [...]
> >>>>> That's pretty cool. Out of curiosity, have you tried asking your
> >>>>> employer to set up a scheduling system with notifications?
> >>>>>
> >>>>
> >>>> Nah, because my smartphone has a built is scheduling system with notifications already.
> >>>
> >>>       ... which almost certainly provides iCalendar import/export.
> >>>
> >>> 	https://en.wikipedia.org/wiki/ICalendar
> >>>
> >>
> >> I'll look at it this weekend. The reason why I used the built in scheduling system with notifications is because
> >>
> >> 1)It's built into the Android smartphone. This means, since it's like native, then in theory, I should get better performance than using a non native tool that uses JavaScript to achieve the same magic.
> >>
> >> 2)I forgot what else. But a Physics major at UCLA made a similar comment when he saw my phone app.
> > 
> > Okay, I took the bait and read the wiki article. I guess I don't understand the whole scheduling and notification thing because I'm not seeing the fundamental difference between the Android Notification/Job Scheduler and iCalendar. This is because on the surface they seem to do the exact same thing.
> 
>      Here's the gist: iCalendar is a standard for communicating
> descriptions of calendar events like appointments, work shifts,
> baseball games, meetings with your parole officer, and so on.
> The iCalendar standard is supported by lots and lots of systems,
> almost certainly including the one built-in to your phone and
> whatever your employer might deploy (or already have deployed).
> 
>      That is, if you follow Daniele Futtorovic's suggestion you
> will very likely need to do little or no programming.
> 
>      (... unless I've misunderstood the goal, which is always a
> possibility.)
> 

I see no iCalendar API for Android 7.2 and lower.

[toc] | [prev] | [next] | [standalone]


#39275

FromDaniele Futtorovic <da.futt.news@laposte-dot-net.invalid>
Date2020-01-05 18:00 +0100
Message-ID<qut4np$5cs$1@dont-email.me>
In reply to#39266
On 2020-01-03 13:54, chad altenburg wrote:
> 1)It's built into the Android smartphone. This means, since it's like native, then in theory, I should get better performance than using a non native tool that uses JavaScript to achieve the same magic.
> 
> 2)I forgot what else. But a Physics major at UCLA made a similar comment when he saw my phone app.

Excellent. :D

-- 
DF.

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.java.programmer


csiph-web