Re: Unit tests (was Re: [NF] I will .....)

2020-07-24 Thread MB Software Solutions, LLC
Yes, I use stored procs for heavy lifting that I don't want to bring across the wire.  "Just give me the final (aggregated) dataset." On 7/24/2020 9:23 AM, Stephen Russell wrote: I'll bite. If you don't use sprocs for standard CRUD operations, why do you need them? Do you work with a great dea

Re: Unit tests (was Re: [NF] I will .....)

2020-07-24 Thread Stephen Russell
gt; environment with your data. > > -- > > rk > > -Original Message- > From: ProfoxTech On Behalf Of MB Software > Solutions, LLC > Sent: Friday, July 24, 2020 9:30 AM > To: profoxt...@leafe.com > Subject: Re: Unit tests (was Re: [NF] I will .) > &

RE: Unit tests (was Re: [NF] I will .....)

2020-07-24 Thread Richard Kaye
st in your environment with your data. -- rk -Original Message- From: ProfoxTech On Behalf Of MB Software Solutions, LLC Sent: Friday, July 24, 2020 9:30 AM To: profoxt...@leafe.com Subject: Re: Unit tests (was Re: [NF] I will .) I always thought stored procedures were faster?? On

Re: Unit tests (was Re: [NF] I will .....)

2020-07-24 Thread Stephen Russell
This is an actual test in my code: [TestMethod] public void custItemView() { String item = "351000287"; String VenItem = EFData.GetCustomerPartFromView(item); Assert.IsTrue(VenItem.Length > 0); } My function has a view of all items in ou

Re: Unit tests (was Re: [NF] I will .....)

2020-07-24 Thread MB Software Solutions, LLC
: profoxt...@leafe.com Subject: Re: Unit tests (was Re: [NF] I will .) On 7/23/2020 8:07 PM, Stephen Russell wrote: Pretty much for anything that is repetitive in nature. All apps yes. I have the instances set to not allow homemade sql except for some of our new stuff in R, or my certificate

Re: Unit tests (was Re: [NF] I will .....)

2020-07-24 Thread Stephen Russell
I'll bite. If you don't use sprocs for standard CRUD operations, why do you need them? Do you work with a great deal of 4th normal data that the joining of the same tables over and over is easier in a sproc? Or do you have a process like EOM where you are doing repetitive things to data tables?

Re: Unit tests (was Re: [NF] I will .....)

2020-07-24 Thread Alan Bourke
> I still have trouble conceptualizing how to write unit tests for data > access. That's an integration test, really, not a unit test. What I do is set up data sets of VFP tables or SQL Server and then zip\unzip the one that applies to the test, as part of the test. -- Alan Bourke alanpb

RE: Unit tests (was Re: [NF] I will .....)

2020-07-24 Thread Richard Kaye
There are performance implications to using SPs, at least in MSSQL. -- rk -Original Message- From: ProfoxTech On Behalf Of MB Software Solutions, LLC Sent: Thursday, July 23, 2020 10:27 PM To: profoxt...@leafe.com Subject: Re: Unit tests (was Re: [NF] I will .) On 7/23/2020 8:07

Re: Unit tests (was Re: [NF] I will .....)

2020-07-24 Thread Charlie
What I have seen from TDD is the following: -  Lazy behavior - developer types (or the 'testing group') run off to write a lot of 'test code' instead of asking the hard questions of stakeholders - pushing on things that are not solid, etc (TDD generally has it's own 'syntax' like an additional

Re: Unit tests (was Re: [NF] I will .....)

2020-07-23 Thread MB Software Solutions, LLC
On 7/23/2020 8:07 PM, Stephen Russell wrote: Pretty much for anything that is repetitive in nature. All apps yes. I have the instances set to not allow homemade sql except for some of our new stuff in R, or my certificate report that passes SQL to include all of the Lot Numbers needed. It is o

Re: Unit tests (was Re: [NF] I will .....)

2020-07-23 Thread Stephen Russell
Pretty much for anything that is repetitive in nature. All apps yes. I have the instances set to not allow homemade sql except for some of our new stuff in R, or my certificate report that passes SQL to include all of the Lot Numbers needed. It is on a separate sql server and operates very slowl

Re: Unit tests (was Re: [NF] I will .....)

2020-07-23 Thread MB Software Solutions, LLC
Stephen -- Are you still using stored procedures for all your CRUD? On 7/23/2020 5:54 PM, Stephen Russell wrote: I only see it as testing a connection to a defined data source. You have creds that work for a positive test. You have creds that fail to notify you that no connection was made. I

Re: Unit tests (was Re: [NF] I will .....)

2020-07-23 Thread Stephen Russell
I only see it as testing a connection to a defined data source. You have creds that work for a positive test. You have creds that fail to notify you that no connection was made. If your function receives params for the actual source you are just changing the params you pass back, or where they a

Re: [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-23 Thread MB Software Solutions, LLC
On 7/23/2020 2:12 PM, Christof Wollenhaupt wrote: For projects that use a more object oriented approach I use foxmock to simulate data. Most times what I really need isn't the actual data access, because I know that these classes work, rather I have to test the code that accesses data. foxmock

Re: [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-23 Thread Christof Wollenhaupt
> I still have trouble conceptualizing how to write unit tests for data > access. I have a function that reads a table and recreates the same structure as an empty cursor with all indexes, and such. Optionally, it appends the existing content of the table. In my unit test I can then make changes

Re: Unit tests (was Re: [NF] I will .....)

2020-07-23 Thread Ed Leafe
On Jul 23, 2020, at 12:17, Garrett Fitzgerald wrote: > > I still have trouble conceptualizing how to write unit tests for data > access. That’s good, because once you exercise anything outside of the “unit”, it’s no longer a unit test. What you generally do is mock the database call, returning

Re: Unit tests (was Re: [NF] I will .....)

2020-07-23 Thread Garrett Fitzgerald
I still have trouble conceptualizing how to write unit tests for data access. On Thu, Jul 23, 2020, 11:37 MB Software Solutions, LLC < mbsoftwaresoluti...@mbsoftwaresolutions.com> wrote: > I have done it that way before, and it works well. I wrote the DataObj > and BizObj first before the UI for

Re: Unit tests (was Re: [NF] I will .....)

2020-07-23 Thread MB Software Solutions, LLC
I have done it that way before, and it works well.  I wrote the DataObj and BizObj first before the UI for those purposes.  But alas, those are mere validation and data access classes; those are not Unit Tests, by my definition anyway.  Ever since I did this n-tier design after watching Bob Lee

Re: [SPAM] [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-22 Thread Stephen Russell
Whenever you go back into it for one reason or another, add a new test for that area you are working in. If all of your code is in screens or forms, you might be doing it wrong. On Wed, Jul 22, 2020 at 10:55 AM Eric Selje wrote: > /It doesn't make sense to retrospectively create unit test for a

Re: [SPAM] [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-22 Thread Eric Selje
/It doesn't make sense to retrospectively create unit test for an existing application/ Useful for when you're going to make changes and you want to ensure they don't break your existing app, especially for code that you inherited and may not fully understand. That was the impetus behind that feat

Re: [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-22 Thread Alan Bourke
> My UI rarely does any voodoo for making things work. Been that way for > almost 20 years now. Plus with Fox of course the more you keep in PRG files the easier it is to work with source control. -- Alan Bourke alanpbourke (at) fastmail (dot) fm On Wed, 22 Jul 2020, at 3:21 PM, Stephen R

Re: [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-22 Thread Stephen Russell
DBT. Design by Test is how I work. My UI rarely does any voodoo for making things work. Been that way for almost 20 years now. On Wed, Jul 22, 2020 at 7:59 AM Eric Selje wrote: > I may be biased here, having given the Unit Test talk at SW Fox and now > maintaining FoxUnit on GitHub, but to me

Re: [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-22 Thread Stephen Russell
You test success and expected failure. Your code lives in the business layer/object. In one prg you call all of that functionality one at a time to make sure it works, as expected. If a function receives a date as a parameter, pass in a bad date to validate it doesn't work. Over the life of you

Re: [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-22 Thread Alan Bourke
On Wed, 22 Jul 2020, at 7:35 AM, Christof Wollenhaupt wrote: > It's even quicker if you use FoxUnit and foxmock. I couldn't do without FoxUnit, and NUnit in C# now. -- Alan Bourke alanpbourke (at) fastmail (dot) fm ___ Post Messages to: ProFo

Re: [SPAM] [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-22 Thread Christof Wollenhaupt
> Having said that, TDD does work "best" for new development, and many VFP > devs are not doing a ton of apps from scratch which is why it may not have > caught on. It also works best with logic that's not buried in the UI, and > unfortunately a lot of us buried it there (forgive me father). We h

Re: [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-22 Thread Matt Slay
FoxPro let’s you put code in the UI pieces? I’m gonna check that out. Sounds neat. Matt Slay > On Jul 22, 2020, at 7:58 AM, Eric Selje wrote: > > I may be biased here, having given the Unit Test talk at SW Fox and now > maintaining FoxUnit on GitHub, but to me Test-Driven Development is

Re: [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-22 Thread Eric Selje
I may be biased here, having given the Unit Test talk at SW Fox and now maintaining FoxUnit on GitHub, but to me Test-Driven Development is one of those things where I "saw the light". As Stephen says, writing the tests first forces you to think about design first, which always leads to better prog

Re: [SPAM] Unit tests (was Re: [NF] I will .....)

2020-07-21 Thread Christof Wollenhaupt
> > To make an unit test in VFP is as easy as anything: > just write your code, highlight it, activate the shortcut (right mouse > click), select the option 'Execute the selection'. A very neat and quick > solution. It's even quicker if you use FoxUnit and foxmock. Both are free on VFPX. I've h

Re: Unit tests (was Re: [NF] I will .....)

2020-07-21 Thread Koen Piller
To make an unit test in VFP is as easy as anything: just write your code, highlight it, activate the shortcut (right mouse click), select the option 'Execute the selection'. A very neat and quick solution. Stay healthy, Koen Op wo 22 jul. 2020 om 02:09 schreef Stephen Russell : > Why not? > > De

Re: Unit tests (was Re: [NF] I will .....)

2020-07-21 Thread Stephen Russell
Why not? Design by Test. You create your functionality in TESTS and then use those functions in a UI. On Tue, Jul 21, 2020 at 5:53 PM MB Software Solutions, LLC < mbsoftwaresoluti...@mbsoftwaresolutions.com> wrote: > I would wager that less than 5% of devs (in VFP anyway) have unit tests > in t

Re: [NF] I will .....

2020-07-21 Thread MB Software Solutions, LLC
LMAO!!! "Tabs vs. spaces!" On 7/21/2020 12:19 PM, Bill Anderson wrote: As a developer once (dramatically, suspiciously looks left, looks right) I tried using tabs as an indentation... Please forgive me Bill Anderson On Tue, Jul 21, 2020 at 6:15 AM Eric Selje wrote: Forgive me father,

Unit tests (was Re: [NF] I will .....)

2020-07-21 Thread MB Software Solutions, LLC
I would wager that less than 5% of devs (in VFP anyway) have unit tests in their solution setup. On 7/21/2020 10:04 AM, Johan Nel wrote: Ah my child, I have to confess I have never in my complete development career had a plan or unit test done... On 2020/07/21 15:13, Eric Selje wrote: Forgiv

Re: [NF] I will .....

2020-07-21 Thread Eric Selje
Apostate! Heathen! On Tue, Jul 21, 2020 at 11:19 AM Bill Anderson wrote: > As a developer once (dramatically, suspiciously looks left, looks right) I > tried using tabs as an indentation... > > Please forgive me > > Bill Anderson > > On Tue, Jul 21, 2020 at 6:15 AM Eric Selje wrote: > > > Forg

Re: [NF] I will .....

2020-07-21 Thread Alan Bourke
I do lots of unit\integration tests, but test-driven development where you write a bunch of tests first? As if. -- Alan Bourke alanpbourke (at) fastmail (dot) fm ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: https://mail.leafe.

Re: [NF] I will .....

2020-07-21 Thread Bill Anderson
As a developer once (dramatically, suspiciously looks left, looks right) I tried using tabs as an indentation... Please forgive me Bill Anderson On Tue, Jul 21, 2020 at 6:15 AM Eric Selje wrote: > Forgive me father, for I have started coding without having a plan or even > a unit test written

Re: [NF] I will .....

2020-07-21 Thread Charlie Coleman
Actually, things are more like, "... there are evil-doers who have crept in, teaching deceit and all manner of untruths..." There have been very few advancements in 'development approaches'. Most are repackaging and new terminology of things previously discovered and used. The same is true of most

Re: [NF] I will .....

2020-07-21 Thread Johan Nel
Ah my child, I have to confess I have never in my complete development career had a plan or unit test done... On 2020/07/21 15:13, Eric Selje wrote: Forgive me father, for I have started coding without having a plan or even a unit test written first. It's been 51 years since my last confession.

Re: [NF] I will .....

2020-07-21 Thread Vince Teachout
On 07/21/20 9:13 AM, Eric Selje wrote: Forgive me father, for I have started coding without having a plan or even a unit test written first. It's been 51 years since my last confession. You are forgiven.  Go, and sin no more. (And we need that program yesterday) -- This email has been checked

Re: [NF] I will .....

2020-07-21 Thread Eric Selje
Forgive me father, for I have started coding without having a plan or even a unit test written first. It's been 51 years since my last confession. On Sat, Jul 18, 2020 at 1:57 PM Dennis Schuette wrote: > That's such an easy change, I won't even bill you for it. > > 1 hour of programming, 5 hours

RE: [NF] I will .....

2020-07-18 Thread Dennis Schuette
That's such an easy change, I won't even bill you for it. 1 hour of programming, 5 hours of debugging, and 3 customer requested enhancements later, I'm almost done! Customized Business Services, LLC (928) 580-6352 Dennis Schuette  Primary:

RE: [NF] I will .....

2020-07-18 Thread John Weller
I seem to remember that that was one of the deadly sins - but can't remember why 😊 John Weller 01380 723235 07976 393631 > > My 15 month development window got shrunk to 3 weeks, and in a panic I used > customer Social Security Numbers as primary keys. for no real reason > other than > at

Re: [NF] I will .....

2020-07-17 Thread M Jarvis
On Fri, Jul 17, 2020 at 9:07 AM Stephen Russell wrote: > Alright, I'm not a priest, but I am a programmer. > > Confess to me your programming sins, and I shall absolve you. > My 15 month development window got shrunk to 3 weeks, and in a panic I used customer Social Security Numbers as primary k

RE: [NF] I will .....

2020-07-17 Thread Paul H. Tarver
I have created variables on the fly without declaring them at the beginning of my procedures. I've been attending THOR BeautifyX meetings regularly and I've been able to avoid that particular sin for at least six months now. But the guilt remains... Paul H. Tarver -Original Message-

Re: [NF] I will .....

2020-07-17 Thread Stephen Russell
Playing with the snake? Not good. On Fri, Jul 17, 2020 at 2:22 PM John Weller wrote: > I have been unfaithful to my true love - I have been dabbling with Python > and SQLite. I wish you could get FoxPro on a Raspberry Pi. > > John Weller > 01380 723235 > 079763 93631 > Sent from my iPad > > > O

Re: [NF] I will .....

2020-07-17 Thread John Weller
I have been unfaithful to my true love - I have been dabbling with Python and SQLite. I wish you could get FoxPro on a Raspberry Pi. John Weller 01380 723235 079763 93631 Sent from my iPad > On 17 Jul 2020, at 17:07, Stephen Russell wrote: > > Alright, I'm not a priest, but I am a programmer