CodeSnip 5 - Proposed Feature Removal

I'm getting on with developing CodeSnip v5 and have been thinking of ditching some features that have struck me as particularly useless. These are all features I haven't used personally since CodeSnip v1.

They are:

  1. The Save Snippet option from the File menu.
  2. The related Copy Snippet option from the View menu.

Before I delete the features I'm looking for some feedback as to whether anyone uses them and can't live without them. If you want to keep them in v5 please get in touch. If I don't hear any howls of protest, the features are going to go!

Let me know what you think either by commenting or sending me a message via my website's contact page.

What follows is a little overview of what the features do.

All these options do is to generate something like the following and either put it on the clipboard or write it to file:

{
 * This code snippet was generated by DelphiDabbler CodeSnip Release 4.8.0 on
 * Mon, 16 Sep 2013 16:53:57 GMT. It is made available on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. The code is used
 * entirely at your own risk.
}

{
  Required unit(s):
    SysUtils
}

function DateQuarterEnd(const D: TDateTime): TDateTime;
  {Gets the date of the last day of the quarter containing a given date.}
var
  Year, Month, Day, Quarter: Word;
begin
  SysUtils.DecodeDate(D, Year, Month, Day);
  Quarter := 4 - ((12 - Month) div 3);
  // get 1st day of following quarter
  Month := 0;
  SysUtils.IncAMonth(Year, Month, Day, Quarter * 3 + 1);
  // required date is day before 1st day of following quarter
  Result := SysUtils.EncodeDate(Year, Month, 1) - 1.0;
end;

There's also the Edit | Copy Source Code option that just put the actual snippet source on the clipboard:

function DateQuarterEnd(const D: TDateTime): TDateTime;
var
  Year, Month, Day, Quarter: Word;
begin
  SysUtils.DecodeDate(D, Year, Month, Day);
  Quarter := 4 - ((12 - Month) div 3);
  // get 1st day of following quarter
  Month := 0;
  SysUtils.IncAMonth(Year, Month, Day, Quarter * 3 + 1);
  // required date is day before 1st day of following quarter
  Result := SysUtils.EncodeDate(Year, Month, 1) - 1.0;
end;

So, all the first option adds is to list the dependencies in comments (which you can get in more details from the program's View | Dependencies menu option) and some disclaimer.

Over to you.

Comments

  1. In my Opinion if a feature is there
    why take it out?
    It is no heavy?
    See all those "MS word/excel" features who need theme and they are
    still there.

    ReplyDelete
  2. I have to admit I haven't had the occasion to use the features yet but they do seem like they could be useful at times.

    ReplyDelete
  3. OK

    I'll leave 'em in. They're not "heavy" but may have to be frozen (i.e. may not be able to relate well to new features).

    ReplyDelete

Post a Comment

Comments are very welcome, but please don't comment here if:

1) You have a query about, or a bug report for, one of my programs or libraries. Most of my posts contain a link to the relevant repository where there will be an issue tracker you can use.

2) You have a query about any 3rd party programs I feature, please address them to the program's developer(s) - there will be a link in the post.

3) You're one of the tiny, tiny minority who are aggressive or abusive - in the bin you go!

Thanks

Popular posts from this blog

New String Property Editor Planned For RAD Studio 12 Yukon 🤞

Multi-line String Literals Planned For Delphi 12 Yukon🤞

Call JavaScript in a TWebBrowser and get a result back