proposal for date_time implementation
hi mentors plz review my project and give me suggestion to improve to my proposal Name :Shamsher Ahmed College/University:University Insititute of Engineering &Technology,Chandigarh,India Course/Major:Computer Science & Engineering Degree Program:Bachelor of Engineering Email:mail.shamshersiddiqui@gmail.com Homepage:Not yet Availability: How much time do you plan to spend on your GSoC? I can work full time to complete this project. What are your intended start and end dates? I will start the project according to GSOC 2013 schedule but i will try to finish the project 2 weeks before so that I can have the necessary time for debugging and for unforeseen situation it occurs. What other factors affect your availability (exams, courses, moving, work, etc.) ? My semester exam will get start from 18 may and it will end on 28 may .So I will have complete time to dedicate. I don’t have any course or work during this summer . Background Information: • Please summarize your educational background (degrees earned, courses ,taken, etc.) I passed out 10+2 from Indian School Certificate in 2010 and I am currently pursing bachelor of engineering from university institute of Engineering & Technology, Chandigarh Till now I mainly focused in learning programming language (C,C++,Java). I have mastered over Java and c++ but scratchy in C.I have also taken course on Algebra, Calculus, Data Structure & Algorithm ,database etc etc. • Please summarize your programming background (OSS projects, internships,jobs, etc.) This will be my first OSS project at such large level. I have developed many things in c++ & Java. During my last summer I have done my internship in slr infotech ,a small software firm . • Please tell us a little about your programming interests : I am programming from 8th grade .In 10 and +2 board exam I obtained 96 and 97 respectively in my computer science subject. I love to code for hours .And most important thing about open-source I like about is sharing, helping and hacking code . • Please tell us why you are interested in contributing to the Boost C++ Libraries? Boost c++ Libraries are one most powerful libraries of c++ used by many well known organizations .It is cross platform library which has high efficiency And it goes together with standard template library in c++. I will get support from boost community and it is documented very well which makes it very easy to understand and if any bugs comes than it is easily recognized and eliminated , lastly while working with bright minds I will be able to learn from them and impart my experience , knowledge to other developers • What is your interest in the project you are proposing? Libraries were mystery for me when I started learning my first programming language c but after some time I was able to perform the same task without using library but there was increase in time and length of code for doing the same program.I want to develop this project because it will increase the reusability of code and in Boost community best minds works together to give the one of the best libraries of c++. Date library will be always used in every development project whether big or small and When I read this project https://svn.boost.org/svn/boost/sandbox/chr ono_date/libs/date/doc/date.html .This is small library but will be most efficient and will be able to perform all task and save time ,reusability of code is very high. • Have you done any previous work in this area before or on similar projects? No ,I haven’t done any project regarding libraries but I am using libraries in my other project. But me and my friend are developing a tagging software which creates a folder on the basis of album,artist,track number etc. We have implemented internal structure but GUI part is left which my friend is working on. and developed small games in c++ as my project assignment. • What are your plans beyond this Summer of Code time frame for your proposed work? After Summer of code ,I will remain involve with the boost c++ community and I would like to add more feature to current project.Secondly I will work with the boost community in building in their library because I love coding for long hour. I enjoy this work. • Please rate, from 0 to 5 (0 being no experience, 5 being expert), your knowledge of the following languages, technologies, or tools: C++: 4 C++ Standard Library: 3 Boost C++ Libraries: 2 Subversion :2 • What software development environments are you most familiar with (Visual Studio, Eclipse, KDevelop, etc.) I generally use Qt creater or Visual studio depending on the operating system I am using . • What software documentation tool are you most familiar with (Doxygen, DocBook, Quickbook, etc.)? I am familiar with Doxygen Project Proposal Goals & Implemenatations 1) Construction of Date: • Date can be represented in two ways field representation or as an serial representation . In field based representation(YMD) date value is constructed from individual year,month,and day value in three integral value. In serial reprensentation(SERIAL) data values are stroed in intergral number of days from an implementation defiend epoch date, there is third hybrid version to represent the date which implemantd the both representation and it is named HH_YMD_SERIAL_X where x represents the size of types in byte. • Providing support for entering the date in form YDM(year,day,month) which is lacking currently in chrono:date library • No invalid dates can be entered considering range cheaking ,non existent date if entered bad_date exception is thrown . • Constructing constant object for day,week_day. Eg. last/may/2000 represents 31 may 2000 • Construction of meta data for date 1) Leap year flag 2) Nth day of month 3) Nth weekday month 2) Arithematic Operation On date Date airthematic can be done on three units i.e day,month,year.In chrono date ::calendar(Gregorian calendar) length of month and year is not fixed : • day arithematic 1) Adding number of days to date until range doesn’t exceed 2) Implementing last day arithmetic to avoid the bad date excepti Eg. aug/last/2011 +months(1)= sep/30/2011 aug/31/2000 +months(1)=sep/31/2000 //invalid date bad date excep thrown • month arithmetic Month arithmetic is quite complex compared to day arithmetic since number of are not fixed . 1) (month day <=28 || month day =last day ) always add month 2) month day =29 cheak for leap year and than add month 3) Month day>=30 add but don’t add if resulting month is feb 4) Using constant objects for month arithmetic. • year arithematic 1) Always add year to date considering the condition of leap year 2) Reversal of date back to original date 3) Usage of last day during year arithematic During any of the airthematic operation result should not be an invalid date if it occurs than bad_date exception is thrown. 3) InterConversion field representation & serial representation Some operation are quite fast on field but airthematic operation are much faster on serial campared field representation .So it is necessary to provide the inter-coversion so that it can be easily converted from one representation to another. 1) Constructing bi-directional conversion of serial and field by making use of static cache to optimize conversion 4) Building function for week days & date formatting 1) weekday of a date used. 2) nextweek day of date used. 3) previous weekday of date used. 4) finding number of weeks in month 5) formatting of date according of all types 5)Interoperability with other calendar Current chrono::calendar is Gregorian calendar which exist everywhere in date & time library of every programming language.(c,c++,java) and ISO 8601 and POSIX. This section provides conversion of chrono calendar to client calendar. 1) Conversion of chrono ::calendar to Julian Calendar 2) Conversion of chrono :: calendar to Hebrew calendar 3) Conversion of chrono :: calendar to hindu calendar 4) Conversion of chrono :: calendar to Chinese calendar 5) Conversion of chrono :: calendar to Buddhist calendar 6) Conversion of chrono :: calendar to Islamic calendar Hindu ,Chinese ,Buddhist ,Hebrew(Jewish ) calendars are lunisolar calendar with a very little difference. Julian, Gregorian are very much similar except the method of finding the leap year. Islamic calendar is lunar calendar(totally dependent on moon ) which is quite unpredicatable. Hence accurate conversion is rare. TimeLine Until 17 June :Community bonding , understanding boost c++ libraries ,discussing with mentor about the details of proposal . 17 June to 27 June: Construction of date 28 June to 12 july : testing &debugging of construction of date and implementing date arithemetic 13 july to 29 july (Mid term evaluation) : implementation of interconversion of serial and field representation and testing ,debugging and making more efficient the previous code develop. 30 july to 15 August :Implementation of date formatting and developing function on weekday. 16 August to 30 August: testing ,debugging and aadding more feature to weekday and implementation of interconversion of calendar. 31 August to 23 Sept:testing ,debugging ,making efficient the whole code .
Le 23/04/13 20:48, Shamsher Siddiqui a écrit :
hi mentors plz review my project and give me suggestion to improve to my proposal
Name :Shamsher Ahmed
Hi Shamsher, thanks for posting your proposal. I have a general remark. Your proposal is more a list of functionalities than a clear design. H.H. proposal provides a single chrono::date class. I experimented in TBoost Chrono/Date a different approach than the one from H.H. Instead of having a single date class I implemented several classes that model the Date concept. Each class has a different representation and is the more adapted to some kind of functions. I made also the difference between two kind of dates, absolute and relative dates. H.H. has only one date class that has a 'flag' to signal if it is relative or absolute. Each one of these classes is convertible to the other classes making a transformation of the representation. It is not clear how your library proposal positions respect to Howard Hinnant proposal or mine. What are the functions a class date or a model of a concept Date must provide. What do you think of date iterators? What about I/O I don't know if you will have enough time to implement several calendars. I think the best would be to provide a good interface for the Gregorian calendar, by discussing a lot on this ML. It would be great if you mark the features as MUST, SHOULD, and COULD in order to make clear the priorities. Would you start from the H.H implementation, mine or would start from a white page. It would be very important to include in the proposal performances measures for some of the functions depending on the representation. More comments below. Best, Vicente
Project Proposal Goals & Implemenatations
1) Construction of Date: • Date can be represented in two ways field representation or as an serial representation . In field based representation(YMD) date value is constructed from individual year,month,and day value in three integral value. In serial reprensentation(SERIAL) data values are stroed in intergral number of days from an implementation defiend epoch date, there is third hybrid version to represent the date which implemantd the both representation and it is named HH_YMD_SERIAL_X where x represents the size of types in byte. What representation would you choose for your library? • Providing support for entering the date in form YDM(year,day,month) which is lacking currently in chrono:date library Humm, Are you referring to the H. Hinnant Proposal or my implementation on TBoost.Chrono/Date? Why do you think that this constructor is missing?
• No invalid dates can be entered considering range cheaking ,non existent date if entered bad_date exception is thrown . Does it means that the constructor would always check for a valid date? For performances reasons it has been requested too many times to be able to build a date without validating. This doesn't mean that the simple way would not use validation. • Constructing constant object for day,week_day.
Eg. last/may/2000 represents 31 may 2000 • Construction of meta data for date 1) Leap year flag 2) Nth day of month 3) Nth weekday month Could you elaborate on this?
2) Arithematic Operation On date
Date airthematic can be done on three units i.e day,month,year.In chrono date ::calendar(Gregorian calendar) length of month and year is not fixed : • day arithematic 1) Adding number of days to date until range doesn’t exceed What do you mean by "until range doesn't exceed"?
3) InterConversion field representation & serial representation
Some operation are quite fast on field but airthematic operation are much faster on serial campared field representation .So it is necessary to provide the inter-coversion so that it can be easily converted from one representation to another. 1) Constructing bi-directional conversion of serial and field by making use of static cache to optimize conversion Do you mean that you pretend to memoize the conversions?
4) Building function for week days & date formatting
1) weekday of a date used. 2) nextweek day of date used. 3) previous weekday of date used. 4) finding number of weeks in month 5) formatting of date according of all types
5)Interoperability with other calendar
Current chrono::calendar is Gregorian calendar which exist everywhere in date & time library of every programming language.(c,c++,java) and ISO 8601 and POSIX. This section provides conversion of chrono calendar to client calendar. 1) Conversion of chrono ::calendar to Julian Calendar 2) Conversion of chrono :: calendar to Hebrew calendar 3) Conversion of chrono :: calendar to hindu calendar 4) Conversion of chrono :: calendar to Chinese calendar 5) Conversion of chrono :: calendar to Buddhist calendar 6) Conversion of chrono :: calendar to Islamic calendar Hindu ,Chinese ,Buddhist ,Hebrew(Jewish ) calendars are lunisolar calendar with a very little difference. Julian, Gregorian are very much similar except the method of finding the leap year. Islamic calendar is lunar calendar(totally dependent on moon ) which is quite unpredicatable. Hence accurate conversion is rare.
thnx for reviewing my project
Would you start from the H.H implementation, mine or would start from a white page.? i will start with HH implementation What do you think of date iterators? date iterator should be random access iterators since user can either do increment ,decrement , cheaks for equality ,ineaquality all these can be done after making date iterator as random What about I/O? date are streamable and strftime() and strptime() can be used to format the date *strftime*() function formats break the date into formats and stores the result in character array while *strptime*() process the input string from left to right .whitespace, literal, or format are handled one by one by one but it stops processing when it doesn't match the format string . strptime("1991-01-12 18:31:01", "%Y-%m-%d %H:%M:%S", &tm); What are the functions a class date or a model of a concept Date must provide? class date should have following features or function ; 1)compares 2 dates and returning integral values 2)checks for equality. 3)add,subtract 2 dates 4)input and setting of long date format(dd,mm,yy, hh,min,sec) 5)to initialize the date with another copy of date object (creating duplicates) 6)prior and post date check 7)implementation of constructor to initialize the date with string ,full date form It would be great if you mark the features as MUST, SHOULD, and COULD in order to make clear the priorities.
i definitely do it as u told .and rearrange my project according to
must should and could.
No invalid dates can be entered considering range checking ,non existent date if entered bad_date exception is thrown yes i want to check the date is valid or not .and if not bad_date exception is thrown it will increase the time consume but always yield correct result.
.
Constructing bi-directional conversion of serial and field by making use of static cache to optimize conversion
Do you mean that you pretend to memoize the conversions? yes , i meant the same. i have one question ? Your proposal is more a list of functionalities than a clear design.
it means that i have to add description about my proposal rather functionalites.
and i will work on Gregorian calendar interface and functionalities mail u soon . Thank You. Shamsher Ahmed
______________________________**_________________ Unsubscribe & other changes: http://lists.boost.org/** mailman/listinfo.cgi/boosthttp://lists.boost.org/mailman/listinfo.cgi/boost
participants (2)
-
Shamsher Siddiqui
-
Vicente J. Botet Escriba