https://raw.githubusercontent.com/ajmaradiaga/feeds/main/scmt/members/developer-advocates/qmacro.xmlSAP Community - DJ Adams2025-01-24T12:30:07.711049+00:00python-feedgenDJ Adams in SAP Communityhttps://community.sap.com/t5/application-development-discussions/task-10-the-power-of-cdl-with-as-select-july-developer-challenge-quot/m-p/13778040#M2029536Re: Task 10 - The power of CDL with as-select (July Developer Challenge - "Reverse APIs")2024-07-31T09:57:11.358000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>Hi Matthias, thanks. That's odd, I haven't changed or redeployed anything recently. And the service seems to be running fine now. I'll dig into the logs to see if there is anything odd there. </P>2024-07-31T09:57:11.358000+02:00https://community.sap.com/t5/application-development-discussions/task-10-the-power-of-cdl-with-as-select-july-developer-challenge-quot/m-p/13778048#M2029537Re: Task 10 - The power of CDL with as-select (July Developer Challenge - "Reverse APIs")2024-07-31T09:58:18.186000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>Hi there <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/2536">@spassaro</a> - thanks for the comment! Can you please explain a bit more, and provide some detail? What had you written, what do you mean "BAS asked me to ..." and what did you end up having to do? Can you share the code?</P>2024-07-31T09:58:18.186000+02:00https://community.sap.com/t5/application-development-discussions/task-11-using-implicit-parameters-with-a-bound-function-july-developer/m-p/13779337#M2029571Re: Task 11 - Using implicit parameters with a bound function (July Developer Challenge - "Reve2024-08-01T08:13:52.887000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>Please don't forget task 12, <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/11756">@gphadnis2000</a> ! <span class="lia-unicode-emoji" title=":slightly_smiling_face:">π</span></P>2024-08-01T08:13:52.887000+02:00https://community.sap.com/t5/application-development-discussions/task-11-using-implicit-parameters-with-a-bound-function-july-developer/m-p/13779338#M2029572Re: Task 11 - Using implicit parameters with a bound function (July Developer Challenge - "Reve2024-08-01T08:15:15.160000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>I'm not going to be able to comment on whether you're using destructuring assignment if you don't show me the code ... <span class="lia-unicode-emoji" title=":slightly_smiling_face:">π</span> </P><P>Which bits are ambiguous? Your statement itself is a little ... ambiguous <span class="lia-unicode-emoji" title=":winking_face:">π</span></P>2024-08-01T08:15:15.160000+02:00https://community.sap.com/t5/application-development-discussions/task-11-using-implicit-parameters-with-a-bound-function-july-developer/m-p/13779340#M2029573Re: Task 11 - Using implicit parameters with a bound function (July Developer Challenge - "Reve2024-08-01T08:16:34.367000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>Indeed! Dive in and have fun, that's the idea! <span class="lia-unicode-emoji" title=":thumbs_up:">π</span></P>2024-08-01T08:16:34.367000+02:00https://community.sap.com/t5/application-development-discussions/task-12-give-us-feedback-about-this-challenge-july-developer-challenge-quot/m-p/13779766#M2029580Re: Task 12 - Give us feedback about this challenge (July Developer Challenge - "Reverse APIs&q2024-08-01T13:13:05.086000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>Thanks! Can you please explain what you mean about "<SPAN>t's also a little odd that "CDS REPL" was introduced at the last minute, because of some other blog series, of which I wasn't aware"? Cheers. </SPAN></P><P> </P>2024-08-01T13:13:05.086000+02:00https://community.sap.com/t5/application-development-discussions/task-0-server-and-service-provisioning-july-developer-challenge-quot/m-p/13781214#M2029620Re: Task 0 - Server and service provisioning (July Developer Challenge - "Reverse APIs")2024-08-02T14:25:28.876000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>No worries - great to see you here! <span class="lia-unicode-emoji" title=":slightly_smiling_face:">π</span> </P>2024-08-02T14:25:28.876000+02:00https://community.sap.com/t5/application-development-discussions/task-5-a-quot-rest-quot-service-document-july-developer-challenge-quot/m-p/13781218#M2029622Re: Task 5 - A "REST" service document (July Developer Challenge - "Reverse APIs"2024-08-02T14:26:07.711000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>That's the spirit! </P>2024-08-02T14:26:07.711000+02:00https://community.sap.com/t5/application-development-discussions/task-11-using-implicit-parameters-with-a-bound-function-july-developer/m-p/13781220#M2029624Re: Task 11 - Using implicit parameters with a bound function (July Developer Challenge - "Reve2024-08-02T14:27:26.417000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>Might be worth checking your service URL</P>2024-08-02T14:27:26.417000+02:00https://community.sap.com/t5/application-development-blog-posts/sap-developer-news-october-17th-2024/ba-p/13902922SAP Developer News, October 17th, 20242024-10-17T21:00:00.023000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P><div class="video-embed-center video-embed"><iframe class="embedly-embed" src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fg4It7Eeisu8%3Ffeature%3Doembed&display_name=YouTube&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dg4It7Eeisu8&image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fg4It7Eeisu8%2Fhqdefault.jpg&type=text%2Fhtml&schema=youtube" width="600" height="337" scrolling="no" title="CAP Sept, Fiori Innovation, Cloud Integration, Flexso Tech Day, Devtoberfest | SAP Developer News" frameborder="0" allow="autoplay; fullscreen; encrypted-media; picture-in-picture;" allowfullscreen="true"></iframe></div></P><P><STRONG><SPAN>ITEMS</SPAN></STRONG></P><P><STRONG><SPAN>SAP Cloud Application Programming Model September 2024 Release</SPAN></STRONG><SPAN> </SPAN></P><UL><LI><SPAN>Details in Capire </SPAN><A href="https://cap.cloud.sap/docs/releases/sep24" target="_blank" rel="noopener nofollow noreferrer"><SPAN>https://cap.cloud.sap/docs/releases/sep24</SPAN></A> <SPAN> </SPAN></LI></UL><P><STRONG><SPAN>SAP Fiori Innovation Day</SPAN></STRONG><SPAN> </SPAN></P><UL><LI><SPAN>SAP Fiori Innovation Day </SPAN><A href="https://events.sap.com/eur/sap-fiori-innovation-day-heidelberg-2024/en/home" target="_blank" rel="noopener noreferrer"><SPAN>https://events.sap.com/eur/sap-fiori-innovation-day-heidelberg-2024/en/home</SPAN></A><SPAN> </SPAN></LI></UL><P><STRONG><SPAN>SAP Cloud Integration News</SPAN></STRONG><SPAN> </SPAN></P><UL><LI><SPAN>Message Status Overview in Cloud Integration </SPAN><A href="https://help.sap.com/docs/cloud-integration/sap-cloud-integration/monitor-message-status-overview" target="_blank" rel="noopener noreferrer"><SPAN>https://help.sap.com/docs/cloud-integration/sap-cloud-integration/monitor-message-status-overview</SPAN></A><SPAN> </SPAN><SPAN> </SPAN></LI></UL><UL><LI><SPAN>SMB Adapter in Cloud Integration </SPAN><A href="https://api.sap.com/package/SMBAdapterforSAPIntegrationSuite/overview" target="_blank" rel="noopener noreferrer"><SPAN>https://api.sap.com/package/SMBAdapterforSAPIntegrationSuite/overview</SPAN></A><SPAN> </SPAN></LI></UL><UL><LI><SPAN>Message Transform utilities in Cloud Integration </SPAN><A href="https://api.sap.com/package/com.sap.integration.cloud.utilities.MessageTransformations/overview" target="_blank" rel="noopener noreferrer"><SPAN>https://api.sap.com/package/com.sap.integration.cloud.utilities.MessageTransformations/overview</SPAN></A><SPAN> </SPAN></LI></UL><P><STRONG><SPAN>Flexso Tech Day 2024</SPAN></STRONG><SPAN> </SPAN></P><UL><LI><SPAN>Event website </SPAN><A href="https://www.flexso.com/en/events/tech-day-2024" target="_blank" rel="noopener nofollow noreferrer"><SPAN>https://www.flexso.com/en/events/tech-day-2024</SPAN></A> <SPAN> </SPAN></LI></UL><P><STRONG><SPAN>Devtoberfest Week 4</SPAN></STRONG><SPAN> </SPAN></P><UL><LI><SPAN>Devtoberfest sessioΒ‘n calendar </SPAN><A href="https://community.sap.com/t5/devtoberfest/eb-p/devtoberfest-events?calendar=true" target="_blank"><SPAN>https://community.sap.com/t5/devtoberfest/eb-p/devtoberfest-events?calendar=true</SPAN></A><SPAN> </SPAN></LI></UL><UL><LI><SPAN>Devtoberfest contest </SPAN><A href="https://community.sap.com/t5/devtoberfest-blog-posts/devtoberfest-2024-contest/ba-p/13781593" target="_blank"><SPAN>https://community.sap.com/t5/devtoberfest-blog-posts/devtoberfest-2024-contest/ba-p/13781593</SPAN></A><SPAN> </SPAN></LI></UL><P><SPAN>================================================================================</SPAN><SPAN> </SPAN></P><P><STRONG>CHAPTER TITLES </STRONG></P><P><SPAN>0:00 Intro</SPAN><SPAN> <BR /></SPAN><SPAN>0:07 SAP Cloud Application Programming Model September 2024 Release</SPAN><SPAN> <BR /></SPAN><SPAN>2:28 SAP Fiori Innovation Day</SPAN><SPAN> <BR /></SPAN><SPAN>3:10 SAP Cloud Integration News</SPAN><SPAN> <BR /></SPAN><SPAN>4:26 Flexso Tech Day 2024</SPAN><SPAN> <BR /></SPAN><SPAN>5:22 Devtoberfest Week 4</SPAN><SPAN> </SPAN></P><P><STRONG>TRANSCRIPT</STRONG></P><P>[Ajay] Hello, developers, September 2024 release of CAP is now available. The first update is about analytics for Capire Matomo is used to collect anonymized usage data for Capire, and users will have the option to disable the tracking. Coming to the Node.js updates, you can now import type definitions generated by the CDS typer on the top level code, even in the test code. Now we have richer JavaScript and TypeScript snippets in the compiler, which can now carry type information, allowing you to get a better insight into the APIs used there. Instance-based restrictions for bound actions and functions are now also enforced. SAP Cloud Application Event Hub is the new default offering for messaging in SAP Business Technology Platform, Integrating with SAP Cloud Application Event Hub is provided via a CDS plugin <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/163398">@cap</a>-js/event-broker. Moving on to Java updates, we have enhancement to the code generator, where we now have stricter setters in the accessor interfaces. Accessor interfaces now offer the new factory method to access the data in the given map. Monitoring health status of MTX Sidecar is enabled with a new health indicator model provider. Parameter aliases in OData V4 for the entity key values and function parameter values are now also supported. You can easily add handler stubs using add handler CLI command in Java. A new serious property, ui5.version allows you to configure UI5 versions used by the Fiori preview. Finally, in the tools update, we have got beta release to visualize deployment descriptor mta.yaml file. This helps you to get a graphical overview of your microservices architecture and the interplay between the application and the services. This also works as a visual linter. There are two new experimental CDS lint checks, sql-null-comparison and no-java-keywords. For more details, please check the links provided in the description.</P><P>[Nico] Hi everyone, and welcome to the SAP Developer News. The SAP Fiori Innovation Day will happen on November 19th in Heidelberg, Germany in the SAP App Haus, interestingly the same location we were at for SAP TechEd Virtual a couple of weeks ago. The SAP Fiori Innovation Day is open for everyone, and it will be a packed day with content about the SAP Fiori design system, SAP Fiori elements, AI of course, and it will also contain partner sessions. There will also be a hands-on session about the SAP Fiori elements flexible programming model. Check out the link in the description for more information and to register. See you. Bye.</P><P>[Antonio] Hola, SAP developers. I have some exciting news to share with you today. The message status overview that we are so used to in SAP PI/PO is now available in SAP Integration Suite. The message status overview page provides a customizable overview of the messages process and their statuses in a selected time frame, as well as quick navigation to and from the message monitoring in your tenant. Also, there is a new adapter available to us in Cloud Integration. This is the SMB adapter, which will allow you to connect to a server using the SMB protocol, meaning that we can interact with an SMB server and read and write files. This is especially relevant for those on-premises integration scenarios. And finally, there is now an alternative solution in Cloud Integration to the MessageTransformBean adapter module that we often use in SAP PI/PO to aid with the transformation of the message during the runtime. It is in the form of Groovy scripts, which support most of the features that existed on the MTB module. Make sure to check it out. Ciao.</P><P>[DJ] If you're in or can get to the Brussels / Mechelen area of Belgium in early November, then there's a Tech Day happening on the latest SAP tools and technologies. Flexo Tech Day 2024 is happening on Thursday, the 7th of November. And following the welcome and keynote, There are sessions across three separate tracks, analytics and integration, extensions, and there's also a trending track. Now, the full agenda is online. The day is open to everyone, but spaces are limited. So head on over to the website to register. And at the end of the day, there's gonna be a beer tasting, mostly because the day is being held in a brewery. What's not to like? I'll be there. See you there too.</P><P>[Nico] Hi everyone, and welcome to the SAP Developer News. We're just wrapping up week three of Devtoberfest, which means there's just one week left for Devtoberfest 2024. So next week we'll have five more days of packed content, all about SAP development. So on Monday, it will be ABAP and CAP again. On Tuesday, Tooling Tuesday, we'll talk about the SAP Build family. Wednesday is Integration Day. On Thursday we talk about MAD, which is machine learning, AI and data. And Friday will be Frontend Friday as well as Fun Friday. And for Fun Friday next week there will be Spooktoberfest, so expect a spooky day. Overall, next week I counted 24 sessions scheduled, that's a lot of content and it's great content too. We hope to see many more familiar faces as well as new faces. Welcome if you're new to this channel. Now's your chance to earn points in the Devtoberfest gameboard and to progress towards Nerdvana, which would qualify you for the Devtoberfest grand prize. So hope to see you around and see you next time.</P>2024-10-17T21:00:00.023000+02:00https://community.sap.com/t5/devtoberfest-blog-posts/bugtoberfest-wrap-up/ba-p/13913717Bugtoberfest Wrap Up!2024-10-21T15:00:00.066000+02:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P><EM><STRONG>Posting on <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/7488">@MichelleMoudy</a> 's behalf.</STRONG></EM></P><P>Bugtoberfest is officially over! I hope everyone who wanted to participate was able to complete the tutorials and find all the bugs! As the week is officially over, those of us who wrote these bug hunts wanted to share the intended bugs we wrote into them so y'all had an opportunity to check your work.</P><P><STRONG>By the way, while Bugtoberfest is over, Spooktoberfest is this week's Fun Friday event - check out the details in the <A href="https://community.sap.com/t5/devtoberfest-discussions/spooktoberfest-2024/m-p/13903993" target="_self">Spooktoberfest 2024</A> blog post!</STRONG></P><P>But before getting to that, I wanted to share a bit about the origin of the name bug used for coding errors. While most believe the origin comes from a real moth getting comfy in a relay in the Mark II at Harvard in 1947, the word actually comes from the terms bugbear or bugaboo. The term bug as used to describe an issue or error in engineering and can be seen in use by Thomas Edison in 1878, well before it was used to describe software or hardware faults.</P><P>As a fun aside, us developer advocates had a debate to the origin of the term at a dinner during TechEd Virtual and I ruined many evenings by sharing this fun fact with everyone. I even had to read aloud an article to prove that it didn't originate from the Harvard moth (which was shared as folks found it really funny a bug was caused by a real bug), as I was met with such disbelief. As a result, I was told I had to include this "fun" fact and story somewhere in relation to Bugtoberfest. </P><P><A href="https://en.wikipedia.org/wiki/Bug_(engineering)" target="_self" rel="nofollow noopener noreferrer">For proof that I am in fact correct on the origin of the term bug, see here for more details and links to sources.</A></P><P>Now that everyone is aware of the origin of bugs, check out each of the sections below to see the bugs we purposefully wrote into our individual bug hunts. </P><H2 id="toc-hId-1072904484">ABAP</H2><H3 id="toc-hId-1005473698">Easy</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-abap"><code>CLASS ztest
DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
PUBLIC SECTION.
METHODS test_value.
METHODS test_value1.
PROTECTED SECTION.
PRIVATE SECTION.
ENDCLASS.
CLASS ztest
IMPLEMENTATION.
METHOD test_value2.
ENDMETHOD.
METHOD test_value1
ENDCLASS.</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId-938042912">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><SPAN>Bug 1: At line 17, missing full stop `.` after `METHOD test_value1`.<BR /></SPAN><SPAN>Bug 2: At line 18, missing `ENDMETHOD` for `test_value1 METHOD`.<BR /></SPAN><SPAN>Bug 3: At line 15, implemented Wrong Method `test_value2` instead of `test_value`.</SPAN></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 17, missing full stop `.` after `METHOD test_value1`.Bug 2: At line 18, missing `ENDMETHOD` for `test_value1 METHOD`.Bug 3: At line 15, implemented Wrong Method `test_value2` instead of `test_value`.</div></div></noscript></div></div><H3 id="toc-hId-612446688">Medium</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-abap"><code>@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Carrier View - CDS Data Model'
@Search.searchable: true
define view entity ZTest
as selectfrom /dmo/flight as Flight
association [1] to /DMO/I_Carrier as _Airline
{
@UI.lineItem: [ { position: 10, label: 'Airline'} ]
@Search.defaultSearchElement: true
@Search.fuzzinessThreshold: 0.7
@ObjectModel.text.association: '_Airline'
key Flight.carrier_id as AirlineID,
@UI.lineItem: [ { position: 20, label: 'Connection Number' } ]
key Flight.connection_id as ConnectionID,
@UI.lineItem: [ { position: 30, label: 'Flight Date' } ]
key Flight.flight_date as FlightDate,
@UI.lineItem: [ { position: 40, label: 'Price' } ]
@Semantics.amount.currencyCode: 'CurrencyCode'
Flight.price as Price,
Flight.currency_code as CurrencyCode,
@Semantics.amount.currencyCode: 'CurrencyCode'
case
when price <= 1000 or price is initial
then cast(price as /dmo/flight_price preserving type)
else
cast( 1000 + (cast(price as abap.numc(16,2)) - 1000 ) *
division(9,10,2) as /dmo/flight_price)
end as
/* Associations */
_Airline
}</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId-545015902">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 5, </SPAN><SPAN>`select`</SPAN><SPAN> from written as </SPAN><SPAN>`selectfrom`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 2: At line 6, association statement is incomplete, should have </SPAN><SPAN>`on $projection.AirlineID = _Airline.AirlineID`</SPAN><SPAN> after </SPAN><SPAN>`_Airline`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 3: At line 28, </SPAN><SPAN>`end as`</SPAN><SPAN> Variable Name missing and comma (,) missing after Variable name.</SPAN></DIV><DIV><SPAN>Bug 4: At line 26, </SPAN><SPAN>`abap.numc`</SPAN><SPAN> is a wrong data type, it should be </SPAN><SPAN>`abap.dec`</SPAN><SPAN>.</SPAN></DIV></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 5, `select` from written as `selectfrom`.Bug 2: At line 6, association statement is incomplete, should have `on $projection.AirlineID = _Airline.AirlineID` after `_Airline`.Bug 3: At line 28, `end as` Variable Name missing and comma (,) missing after Variable name.Bug 4: At line 26, `abap.numc` is a wrong data type, it should be `abap.dec`.</div></div></noscript></div></div><H3 id="toc-hId-219419678">Hard</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-abap"><code>@AbapCatalog.viewEnhancementCategory: [#NONE]
@abapcatalog.sqlViewName: 'ZTESt1'
@AccessControl.authorizationCheck: '#NOT_REQUIRED'
@EndUserText.label: 'Test'
@Metadata.ignorePropagatedAnnotations: true
@ObjectModel.usageType:{
serviceQuality: #X,
sizeCategory: #S,
dataClass: #MIXED
}
define view entity ZTest!
with parameters
P_Currency :/dmo/currency_code
as select from /dmo/travel
association [0] to /DMO/I_Overall_Status_VH_Text as _Status on $projection.Status = _Status.OverallStatus
{
key travel_id as TravelId,
description as Description,
total_price as TotalPrice,
currency_code as CurrencyCode,
concat_with_space(cast(total_price as abap.char( 20) ),
$parameters.P_Curency,1) as AmountInCurrency,
@Consumption.valueHelpDefinition: [{ element: { name:
'/DMO/I_Overall_Status_VH',entity: 'OverallStatus' } }]
status as Status,
_Status.Text as OverallStatus,
}</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId-151988892">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 21, name of view entity should be corrected to </SPAN><SPAN>`ZTest`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 2: At line 3, unwanted </SPAN><SPAN>`β β`</SPAN><SPAN> for </SPAN><SPAN>`#NOT_REQUIRED`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 3: At line 26, unwanted </SPAN><SPAN>`,`</SPAN><SPAN> after </SPAN><SPAN>`OverallStatus`</SPAN><SPAN>. </SPAN></DIV><DIV><SPAN>Bug 4: At line 15, association cardinality should be [</SPAN><SPAN>1</SPAN><SPAN>] instead of [</SPAN><SPAN>0</SPAN><SPAN>].</SPAN></DIV><DIV><SPAN>Bug 5: At line 23, in Syntax of </SPAN><SPAN>`@Consumption.valueHelpDefinition`</SPAN> <SPAN>`element`</SPAN><SPAN> instead of </SPAN><SPAN>`entity`</SPAN><SPAN> written.</SPAN></DIV><DIV><SPAN>Bug 6: At line 24, in Syntax of </SPAN><SPAN>`@Consumption.valueHelpDefinition`</SPAN> <SPAN>`entity`</SPAN><SPAN> instead of </SPAN><SPAN>`element`</SPAN><SPAN> written.</SPAN></DIV><DIV><SPAN>Bug 7: At line 22, in the syntax of </SPAN><SPAN>`concat_with_space`</SPAN><SPAN> there is a type at </SPAN><SPAN>`$parameters.P_Curency,1)`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 8: At line 19, missing annotation for </SPAN><SPAN>`Total_price`</SPAN><SPAN> field.</SPAN></DIV><DIV><SPAN>Bug 9: At line 2, </SPAN><SPAN>`@abapcatalog.sqlViewName`</SPAN><SPAN> is not allowed in view entities. </SPAN></DIV></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 21, name of view entity should be corrected to `ZTest`.Bug 2: At line 3, unwanted `β β` for `#NOT_REQUIRED`.Bug 3: At line 26, unwanted `,` after `OverallStatus`. Bug 4: At line 15, association cardinality should be [1] instead of [0].Bug 5: At line 23, in Syntax of `@Consumption.valueHelpDefinition` `element` instead of `entity` written.Bug 6: At line 24, in Syntax of `@Consumption.valueHelpDefinition` `entity` instead of `element` written.Bug 7: At line 22, in the syntax of `concat_with_space` there is a type at `$parameters.P_Curency,1)`.Bug 8: At line 19, missing annotation for `Total_price` field.Bug 9: At line 2, `@abapcatalog.sqlViewName` is not allowed in view entities. </div></div></noscript></div></div><H2 id="toc-hId--302690051">Bash</H2><H3 id="toc-hId--370120837">Easy</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>#!/usr/bin/env bash
read -p 'Enter your name: '
$answer = $REPLY
echo 'Thank you. You entered $answer.'</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId--437551623">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 4, in the assignment of </SPAN><SPAN>`$REPLY`</SPAN><SPAN> to </SPAN><SPAN>`answer`</SPAN><SPAN>, </SPAN><SPAN>`answer`</SPAN><SPAN> should not be prefixed with </SPAN><SPAN>`$`</SPAN><SPAN>. (this is not Perl!)</SPAN></DIV><DIV><SPAN>Bug 2: At line 4, in the assignment, no spaces are allowed either before or after the equals symbol </SPAN><SPAN>`=`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 3: At line 5, inside single quotes, variables like </SPAN><SPAN>`$answer`</SPAN><SPAN> are not expanded (double quotes are needed here).</SPAN></DIV></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 4, in the assignment of `$REPLY` to `answer`, `answer` should not be prefixed with `$`. (this is not Perl!)Bug 2: At line 4, in the assignment, no spaces are allowed either before or after the equals symbol `=`.Bug 3: At line 5, inside single quotes, variables like `$answer` are not expanded (double quotes are needed here).</div></div></noscript></div></div><H3 id="toc-hId--838379216">Medium</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>#!/usr/bin/env bash
set -e
set pipefail
main {
local account="${1:?No account specified}"
# Cause script to abend if no account data stored
pass "btp/$account" > dev/null
cf login
-a "$(pass "btp/$account/cfapiendpoint")" \
-u "$(pass "btp/$account/user")" \
-p "$(pass "btp/$account/password")"
echo <<EOF
Thank you.
Logged in successfully.
EOF
}
main "$@"</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId--1328295728">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 4, </SPAN><SPAN>`pipefail`</SPAN><SPAN> is an option that you need to set using the </SPAN><SPAN>`-o`</SPAN><SPAN> option of </SPAN><SPAN>`set`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 2: At line 6, functions can be declared with the </SPAN><SPAN>`function`</SPAN><SPAN> keyword like this: </SPAN><SPAN>`function main { ... }`</SPAN><SPAN> or without the </SPAN><SPAN>`function`</SPAN><SPAN> keyword (as here), but parentheses are needed before the code block, like this: </SPAN><SPAN>`main () { ... }`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 3: At line 11, </SPAN><SPAN>`dev/null`</SPAN><SPAN> is relative, not absolute (i.e. there's no leading </SPAN><SPAN>`/`</SPAN><SPAN>) so this is not really what you want (to cleanly suppress </SPAN><SPAN>`STDOUT`</SPAN><SPAN>, output it must be sent to </SPAN><SPAN>`/dev/null`</SPAN><SPAN>).</SPAN></DIV><DIV><SPAN>Bug 4: At line 13, the newline at the end of </SPAN><SPAN>`cf login`</SPAN><SPAN> is not escaped (with a </SPAN><SPAN>`\`</SPAN><SPAN>) so this </SPAN><SPAN>`cf`</SPAN><SPAN> command execution is not valid.</SPAN></DIV><DIV><SPAN>Bug 5: At line 18, echo does not read from STDIN so we can't use a heredoc (<<); instead, </SPAN><SPAN>`cat`</SPAN><SPAN> could be used (or </SPAN><SPAN>`printf`</SPAN><SPAN>).</SPAN></DIV></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 4, `pipefail` is an option that you need to set using the `-o` option of `set`.Bug 2: At line 6, functions can be declared with the `function` keyword like this: `function main { ... }` or without the `function` keyword (as here), but parentheses are needed before the code block, like this: `main () { ... }`.Bug 3: At line 11, `dev/null` is relative, not absolute (i.e. there's no leading `/`) so this is not really what you want (to cleanly suppress `STDOUT`, output it must be sent to `/dev/null`).Bug 4: At line 13, the newline at the end of `cf login` is not escaped (with a `\`) so this `cf` command execution is not valid.Bug 5: At line 18, echo does not read from STDIN so we can't use a heredoc (<<); instead, `cat` could be used (or `printf`).</div></div></noscript></div></div><H3 id="toc-hId--1231406226">Hard</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>#!/usr/bin/env bash
read -p 'Enter a color: ' color
if [ $color == 'black' ]; then
echo "Black is not a color, it is the absence of color"
fi
if [ $color =~ ^(red|green|blue)$ ]; then
echo "You chose a primary color"
fi
cd colors
touch "$color.txt"</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId--1721322738">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 3, using </SPAN><SPAN>`read`</SPAN><SPAN> without </SPAN><SPAN>`-r`</SPAN><SPAN> will mangle backslashes (shellcheck Informational).</SPAN></DIV><DIV><SPAN>Bug 2: At line 5 & 9, it's usually a very bad idea to not quote your variables, especially in a </SPAN><SPAN>`[`</SPAN><SPAN> construct.</SPAN></DIV><DIV><SPAN>Bug 3: At line 9, to use the regular expression operator </SPAN><SPAN>`=~`</SPAN><SPAN> you need the Bash-specific </SPAN><SPAN>`[[ ... ]]`</SPAN><SPAN> construct, and not the </SPAN><SPAN>`[`</SPAN><SPAN> command - see <A href="https://mywiki.wooledge.org/BashFAQ/031" target="_blank" rel="noopener nofollow noreferrer">https://mywiki.wooledge.org/BashFAQ/031</A> and <A href="https://qmacro.org/blog/posts/2020/08/21/the-open-square-bracket-is-an-executable/" target="_self" rel="nofollow noopener noreferrer">The open square bracket [ is an executable</A>.</SPAN></DIV><DIV><SPAN>Bug 4: At line 13, not checking the success (or otherwise) of a </SPAN><SPAN>`cd`</SPAN><SPAN> command is dangerous, and could result in the script creating, changing or deleting files in a place you didn't expect!</SPAN></DIV></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 3, using `read` without `-r` will mangle backslashes (shellcheck Informational).Bug 2: At line 5 & 9, it's usually a very bad idea to not quote your variables, especially in a `[` construct.Bug 3: At line 9, to use the regular expression operator `=~` you need the Bash-specific `[[ ... ]]` construct, and not the `[` command - see https://mywiki.wooledge.org/BashFAQ/031 and The open square bracket [ is an executable.Bug 4: At line 13, not checking the success (or otherwise) of a `cd` command is dangerous, and could result in the script creating, changing or deleting files in a place you didn't expect!</div></div></noscript></div></div><H4 id="toc-hId--1917836243">jq</H4><H4 id="toc-hId--2114349748">Easy</H4><DIV><DIV><SPAN>We want a simple list of products and the categories they're in. The output should look like this:</SPAN></DIV><DIV><PRE><SPAN>Chai is in the Beverages category</SPAN><BR /><SPAN>Chang is in the Beverages category</SPAN><BR /><SPAN>Aniseed Syrup is in the Condiments category</SPAN><BR /><SPAN>Chef Anton's Cajun Seasoning is in the Condiments category</SPAN><BR /><SPAN>...</SPAN></PRE></DIV><BR /><DIV><SPAN>The invocation of the jq script (including bugs) to produce this looks like this:</SPAN></DIV></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>jq --raw \
'.()|"(.ProductName) is in the \(Category.CategoryName) category" \
products.json</code></pre><P> </P><P> </P><P> </P><P> </P><DIV><SPAN>and on its own, with extra whitespace, the (buggy) jq filter looks like this:</SPAN></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-jq"><code>.()
| "(.ProductName) is in the \(Category.CategoryName) category"</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId-1984104043">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><DIV><DIV><SPAN>Bug 1: At line 1 in the jq filter, the array iterator is </SPAN><SPAN>`[]`</SPAN><SPAN>, not </SPAN><SPAN>`()`</SPAN><SPAN> <A href="https://jqlang.github.io/jq/manual/#array-object-value-iterator" target="_self" rel="nofollow noopener noreferrer">(Array Object Value Iterator)</A>.</SPAN></DIV><DIV><SPAN>Bug 2: At line 2 of the jq filter, the string interpolation construct is `</SPAN><SPAN>\(</SPAN><SPAN> ... )` so there's a backslash missing in the first instance (<A href="https://jqlang.github.io/jq/manual/#string-interpolation" target="_self" rel="nofollow noopener noreferrer">String Interpolation</A>)</SPAN></DIV><DIV><SPAN>Bug 3: At line 2 of the jq filter, in the second instance of an expression being inserted into the string, the identity filter </SPAN><SPAN>`.`</SPAN><SPAN> is missing - it should be </SPAN><SPAN>`.Category.CategoryName`</SPAN><SPAN> (<A href="https://jqlang.github.io/jq/manual/#identity" target="_self" rel="nofollow noopener noreferrer">Identity</A>)</SPAN></DIV></DIV></DIV><BR /><DIV><SPAN><SPAN>The correct filter should be:<BR /></SPAN></SPAN></DIV></DIV><pre class="lia-code-sample language-jq"><code>.[]|"\(.ProductName) is in the \(.Category.CategoryName) category"</code></pre></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 1 in the jq filter, the array iterator is `[]`, not `()` (Array Object Value Iterator).Bug 2: At line 2 of the jq filter, the string interpolation construct is `\( ... )` so there's a backslash missing in the first instance (String Interpolation)Bug 3: At line 2 of the jq filter, in the second instance of an expression being inserted into the string, the identity filter `.` is missing - it should be `.Category.CategoryName` (Identity)The correct filter should be:.[]|"\(.ProductName) is in the \(.Category.CategoryName) category"</div></div></noscript></div></div><H3 id="toc-hId-2080993545">Medium</H3><DIV><DIV><SPAN>We want to know how many products are still being sold, i.e. not discontinued. The answer should be a simple numeric value, like this (8 of the 77 total products in this data set are discontinued, so the value here is correct):</SPAN></DIV><PRE><SPAN>69</SPAN></PRE><BR /><DIV><SPAN>The invocation of the jq script (including bugs) to produce this looks like this:</SPAN></DIV></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>jq --raw \
'select(.Discontinued)|length' \
products.jsonβ</code></pre><P> </P><P> </P><P> </P><P> </P><DIV><SPAN>and on its own, with extra whitespace, the (buggy) jq filter looks like this:</SPAN></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-jq"><code>select(.Discontinued)
| length</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId-1591077033">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 1 of the jq filter, the outermost element in the <A href="https://github.com/qmacro/teched-jq-talk/blob/main/products.json" target="_self" rel="nofollow noopener noreferrer">data set</A> is an array, so we must use map to iterate over and call `select` (<A href="https://jqlang.github.io/jq/manual/#map-map_values" target="_self" rel="nofollow noopener noreferrer">Map</A>).</SPAN></DIV><DIV><SPAN>Bug 2: At line 2 of the jq filter, we're after a count of the products that are not discontinued, so we need to negate the boolean expression inside the select (<A href="https://jqlang.github.io/jq/manual/#select" target="_self" rel="nofollow noopener noreferrer">Select</A>).</SPAN></DIV><BR /><DIV><SPAN><SPAN>The correct filter should be:<BR /></SPAN></SPAN></DIV></DIV><pre class="lia-code-sample language-jq"><code>map(select(.Discontinued|not))|length</code></pre></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 1 of the jq filter, the outermost element in the data set is an array, so we must use map to iterate over and call `select` (Map).Bug 2: At line 2 of the jq filter, we're after a count of the products that are not discontinued, so we need to negate the boolean expression inside the select (Select).The correct filter should be:map(select(.Discontinued|not))|length</div></div></noscript></div></div><H3 id="toc-hId-1687966535">Hard</H3><DIV><DIV><SPAN>Based on the <A href="https://github.com/qmacro/teched-jq-talk/blob/main/products.json" target="_self" rel="nofollow noopener noreferrer">data set</A>, we want a summary of categories with the total number of units of stock for each of those categories. The output should look like this:</SPAN></DIV></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-json"><code>{
"Beverages": 559,
"Condiments": 507,
"Confections": 386,
"Dairy Products": 393,
"Grains/Cereals": 308,
"Meat/Poultry": 165,
"Produce": 100,
"Seafood": 701
}</code></pre><P> </P><P> </P><P> </P><P> </P><DIV><SPAN>The invocation of the jq script (including bugs) to produce this looks like this:</SPAN></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-bash"><code>jq --raw \
'group(.Category.CategoryID)|map({first|Category.CategoryName:map(.UnitsInStock)|+})|sum' \
products.json</code></pre><P> </P><P> </P><P> </P><P> </P><DIV><SPAN>and on its own, with extra whitespace, the (buggy) jq filter looks like this:</SPAN></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-jq"><code>group(.Category.CategoryID)
| map({
first|Category.CategoryName:
map(.UnitsInStock)
| +
})
| sum</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId-1366233714">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 1 of the jq filter, the `group` function, which takes a path expression, is `group_by`, not `group` (<A href="https://jqlang.github.io/jq/manual/#group_by" target="_self" rel="nofollow noopener noreferrer">Group By</A>).</SPAN></DIV><DIV><SPAN>Bug 2: At line 3 of the jq filter, while `first` (which is just syntactic sugar for .[0] (<A href="https://github.com/jqlang/jq/blob/master/src/builtin.jq#L177" target="_self" rel="nofollow noopener noreferrer">Built Ins - first</A>)) can be followed by a pipe, it can also be followed directly by the identity filter, which is missing here (should be `first.Category.CategoryName`, or `first|.Category.CategoryName` but not `first|Category.CategoryName`) (<A href="https://jqlang.github.io/jq/manual/#first-last-nth-1" target="_self" rel="nofollow noopener noreferrer">First Last Nth</A>).</SPAN></DIV><DIV><SPAN>Bug 3: At line 3 of the jq filter, to use an expression as a key in a property literal, you need to wrap it in parentheses, i.e. `{(first.Category.CategoryName): ... }`, not `{first.Category.CategoryName: ...}`.</SPAN></DIV><DIV><SPAN>Bug 4: At line 5 of the jq filter, while `+` is valid in jq (it's an operator), it's not valid in the position it is here; the `add` filter is needed to add values in an array (<A href="https://jqlang.github.io/jq/manual/#add" target="_self" rel="nofollow noopener noreferrer">Add</A>).</SPAN></DIV><DIV><SPAN>Bug 5: At line 7 of the jq filter, `sum` is not a valid filter in jq, it's `add`.</SPAN></DIV><BR /><DIV><SPAN><SPAN>The correct filter should be:<BR /></SPAN></SPAN></DIV></DIV><pre class="lia-code-sample language-jq"><code>group_by(.Category.CategoryID)
| map({
(first.Category.CategoryName):
map(.UnitsInStock)
| add
})
| add</code></pre></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 1 of the jq filter, the `group` function, which takes a path expression, is `group_by`, not `group` (Group By).Bug 2: At line 3 of the jq filter, while `first` (which is just syntactic sugar for .[0] (Built Ins - first)) can be followed by a pipe, it can also be followed directly by the identity filter, which is missing here (should be `first.Category.CategoryName`, or `first|.Category.CategoryName` but not `first|Category.CategoryName`) (First Last Nth).Bug 3: At line 3 of the jq filter, to use an expression as a key in a property literal, you need to wrap it in parentheses, i.e. `{(first.Category.CategoryName): ... }`, not `{first.Category.CategoryName: ...}`.Bug 4: At line 5 of the jq filter, while `+` is valid in jq (it's an operator), it's not valid in the position it is here; the `add` filter is needed to add values in an array (Add).Bug 5: At line 7 of the jq filter, `sum` is not a valid filter in jq, it's `add`.The correct filter should be:group_by(.Category.CategoryID)
| map({
(first.Category.CategoryName):
map(.UnitsInStock)
| add
})
| add</div></div></noscript></div></div><H2 id="toc-hId-1756526223">JavaScript</H2><H3 id="toc-hId-1266609711">Easy</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-javascript"><code>const bugFunc = (areThereBugs) -> {
if (areThereBags) {
console.log('Quick! Call an exterminator!);
} else {
console.log('Are you sure there aren't any bugs?');
} else {
console.log('No bugs here! Thank god.');
}
}</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId-776693199">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 1, arrow function syntax is wrong. It should be `=>`, not `->`.</SPAN></DIV><DIV><SPAN>Bug 2: At line 2, variable `areThereBugs` is misspelled to `areThereBags`. </SPAN></DIV><DIV><SPAN>Bug 3: At line 3, There is a missing quote at the end of the string in first console.log.</SPAN></DIV><DIV><SPAN>Bug 4: At line 5, The `'` in `aren't` hasn't been escaped in the second console.log.</SPAN></DIV><DIV><SPAN>Bug 5: At line 6, There's an extra `else` that will never be called. To fix this, line 4 should either be an `else if` or the second `else` should be removed.</SPAN></DIV></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 1, arrow function syntax is wrong. It should be `=>`, not `->`.Bug 2: At line 2, variable `areThereBugs` is misspelled to `areThereBags`. Bug 3: At line 3, There is a missing quote at the end of the string in first console.log.Bug 4: At line 5, The `'` in `aren't` hasn't been escaped in the second console.log.Bug 5: At line 6, There's an extra `else` that will never be called. To fix this, line 4 should either be an `else if` or the second `else` should be removed.</div></div></noscript></div></div><H3 id="toc-hId-873582701">Medium</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-javascript"><code>for (let i = 0: i < 5: i++) {
console.log(looped {i} times);
}</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId-383666189">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 1, for loop condition is using `:` instead of `;` between parameters.</SPAN></DIV><DIV><SPAN>Bug 2: At line 2, in the console.log statement, there are missing quotes. The correct quotes to be used are backticks `\`` for the template literal so the `i` variable is correctly updated within the string.</SPAN></DIV><DIV><SPAN>Bug 3: At line 2, in the console.log statement, there is a missing `$` in front of the variable curly braces `{}`.</SPAN></DIV></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 1, for loop condition is using `:` instead of `;` between parameters.Bug 2: At line 2, in the console.log statement, there are missing quotes. The correct quotes to be used are backticks `\`` for the template literal so the `i` variable is correctly updated within the string.Bug 3: At line 2, in the console.log statement, there is a missing `$` in front of the variable curly braces `{}`.</div></div></noscript></div></div><H3 id="toc-hId-480555691">Hard</H3><DIV><DIV><SPAN>For the last JavaScript bug hunt, "bug" identification is the name of the game. What most people call bugs or insects are actually several different classifications of the phylum arthropods.</SPAN></DIV><BR /><DIV><SPAN>The goal of the function in this bug hunt is to take in an object of an unidentified "bug" and determine if it is a part of the class Insecta or Arachnids, and if Insecta, further identify if it is a true bug in the order Hemiptera. To make things simple, </SPAN><SPAN><STRONG>the function should return one of the three values, "Arachnid", "Insect", or "True Bug".</STRONG></SPAN></DIV><BR /><DIV><SPAN>Please note that some of this data might not technically be correct, entomology wise. For example, there are some arachnids with less than 8 legs. This does not count as a bug. To simplify things, </SPAN><SPAN><STRONG>the objects below are going to be used as the source of truth for arthropod classification</STRONG></SPAN><SPAN>. They should be used to determine if the function </SPAN><SPAN>`isArachnidInsectOrBug`</SPAN><SPAN> will return the correct output.</SPAN></DIV><BR /><DIV><STRONG>Arachnid</STRONG></DIV></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-json"><code>{
antennae: false,
wingPairs: false,
bodySegments: 2,
legs: 8
}</code></pre><P> </P><P> </P><P> </P><P> </P><DIV><SPAN><STRONG>Insect</STRONG></SPAN></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-json"><code>{
antennae: true,
wingPairs: [0, 2],
mouthType: [
"sponging",
"siphoning",
"chewing",
"piercing/sucking flexible",
"piercing/sucking rigid"
],
bodySegments: 3,
legs: 6
}</code></pre><P> </P><P> </P><P> </P><P> </P><DIV><SPAN><STRONG>True Bug</STRONG></SPAN></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-json"><code>{
antennae: true,
wingPairs: [0, 2],
mouthType: "piercing/sucking rigid",
bodySegments: 3,
legs: 6
}</code></pre><P> </P><P> </P><P> </P><P> </P><DIV><SPAN><STRONG>Hint</STRONG></SPAN><SPAN>: </SPAN><SPAN><EM>Keep these classification objects in mind when looking at the functions in the bug hunt.</EM></SPAN></DIV><DIV><SPAN>Below are examples of potential input to the function </SPAN><SPAN>`IsArachnidInsectOrBug`</SPAN><SPAN>. In order to determine what is what, they need to match the values in the classification objects above. Keep in mind that all true bugs are insects but not all insects are true bugs and arachnids are neither. No coding bugs will be about the data itself being wrong.</SPAN></DIV><DIV><SPAN><STRONG>Assume only one value in the classification object parameters with arrays will be chosen for the input object</STRONG></SPAN><SPAN>. For example, in Insect, </SPAN><SPAN>`wingPairs`</SPAN><SPAN> would equal either </SPAN><SPAN>`0`</SPAN><SPAN> or </SPAN><SPAN>`2`</SPAN><SPAN>, not </SPAN><SPAN>`[0]`</SPAN><SPAN> or </SPAN><SPAN>`[0, 2]`</SPAN><SPAN>. You can see this in input example 2.</SPAN></DIV><DIV><SPAN>Example of what could be sent into the function and expected output:</SPAN></DIV><DIV><SPAN><STRONG>Arthropod Input Example 1</STRONG></SPAN></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-json"><code>{
antennae: false,
wingPairs : false,
bodySegments: 2,
legs: 8
}</code></pre><P> </P><P> </P><P> </P><P> </P><DIV><EM>Expected Output: "Arachnid"</EM></DIV><DIV><SPAN><STRONG>Arthropod Input Example 2</STRONG></SPAN></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-json"><code>{
antennae: false,
wingPairs : false,
mouthType: "piercing/sucking flexible",
bodySegments: 3,
legs: 6
}</code></pre><P> </P><P> </P><P> </P><P> </P><DIV><SPAN><EM>Expected Output: "Insect"</EM></SPAN></DIV><DIV><SPAN>Remember, </SPAN><SPAN><STRONG>best practices is not a justification for a bug</STRONG></SPAN><SPAN>. If the code will run and output the expected result, it does not count as a bug. Also keep in mind that the point is to count the bugs, not how to fix the bugs. One fix might take care of several bugs but should not be counted as only one bug.</SPAN></DIV><DIV><SPAN>These are complex bugs so look carefully.</SPAN></DIV><DIV><SPAN><STRONG>Find the bugs in the following code:</STRONG></SPAN></DIV><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-javascript"><code>function isArachnidInsectOrBug (arthropod) {
let bugType = isInsectOrBug(arthropod);
if (!bugType) {
return isArachnid(arthropod);
}
}
function isInsectOrBug(arthropod) {
let bugType = "";
switch (arthropod.mouthType) {
case "sponging":
case "siphoning":
case "chewing":
case "piercing/sucking flexible": {
bugType = "Insect";
}
case "piercing/sucking rigid": {
bugType = "True Bug";
}
}
}
function isArachnid ({antennae, wingPairs, bodySegments, legs}) {
if (!antennae || !wingPairs || bodySegments === 2 || legs === {
return true;
}
}</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId--9360821">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><SPAN>Bug 1: At line 2, calling `isInsectOrBug` first will throw an error if the arthropod is an Arachnid as the arachnid object does not have the `mouthType` parameter. To fix this, call `isArachnid` first and return `Arachnid` before checking if the arthropod is an insect or true bug.</SPAN></DIV><DIV><SPAN>Bug 2: At line 16, in the switch statement in `isInsectOrBug`, doesn't have a break statement and will always cause `bugType` to be "True Bug".</SPAN></DIV><DIV><SPAN>Bug 3: At line 9, `isInsectOrBug` does not have a return statement.</SPAN></DIV><DIV><SPAN>Bug 4: At line 25, `isArachnid` is using the wrong boolean operators to test if arthropods is an arachnid. If any of those are correct, the function will return true. This will cause certain insects to return as Arachnid and is not correct.<BR /></SPAN><SPAN>Bug 5: At line 27, `isArachnid` does not return anything if bug isn't an arachnid. This could cause an error as the returned value will be null. This could be handled in the `isArachnidInsectOrBug` due to truthy values but can cause unexpected errors so returning false is the best option.</SPAN></DIV><DIV><SPAN>Bug 6: At line 5, `isArachnidInsectOrBug` is expecting isArachnid to return the string "Arachnid" but is instead getting a boolean. This will cause isArachnidInsectOrBug to return a boolean rather than one of the three expected strings. To fix this, `isArachnidInsectOrBug` should use the value to return either "Arachnid" or further check for insect or true bug.</SPAN></DIV><DIV><SPAN><SPAN>Bug 7: At line 5, `isArachnidInsectOrBug` will only return if bug is an arachnid. It should return the results of `isInsectOrBug` if not an empty string and otherwise throw an error if insect is none of the three expected results.<BR /><BR />Without bugs, this is what the function could look like (without accounting for best practices and shortening code):<BR /></SPAN></SPAN></DIV><pre class="lia-code-sample language-javascript"><code>function isArachnidInsectOrBug (arthropod) {
let bugType = "";
if (isArachnid(arthropod)) {
bugType = "Arachnid";
} else {
bugType = isInsectOrBug(arthropod);
}
if (bugType !== "") {
return bugType;
} else {
throw new Error({
arthropod: arthropod,
err: "Arthropod is not an Arachnid, Insect, or True Bug."
})
}
}
function isInsectOrBug(arthropod) {
let bugType = "";
switch (arthropod.mouthType) {
case "sponging":
case "siphoning":
case "chewing":
case "piercing/sucking flexible": {
// Alternatively, the string could be returned here instead of using the break statement and the bugType variable.
bugType = "Insect";
break;
}
case "piercing/sucking rigid": {
bugType = "True Bug";
break;
}
}
return bugType;
}
function isArachnid ({antennae, wingPairs, bodySegments, legs}) {
// Alternatively, the result of the boolean statement in the if statement could be returned directly.
// EX. `return (!antennae && !wingPairs && bodySegments === 2 && legs === 8);`
if (!antennae && !wingPairs && bodySegments === 2 && legs === {
return true;
} else {
return false;
}
}</code></pre></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 2, calling `isInsectOrBug` first will throw an error if the arthropod is an Arachnid as the arachnid object does not have the `mouthType` parameter. To fix this, call `isArachnid` first and return `Arachnid` before checking if the arthropod is an insect or true bug.Bug 2: At line 16, in the switch statement in `isInsectOrBug`, doesn't have a break statement and will always cause `bugType` to be "True Bug".Bug 3: At line 9, `isInsectOrBug` does not have a return statement.Bug 4: At line 25, `isArachnid` is using the wrong boolean operators to test if arthropods is an arachnid. If any of those are correct, the function will return true. This will cause certain insects to return as Arachnid and is not correct.Bug 5: At line 27, `isArachnid` does not return anything if bug isn't an arachnid. This could cause an error as the returned value will be null. This could be handled in the `isArachnidInsectOrBug` due to truthy values but can cause unexpected errors so returning false is the best option.Bug 6: At line 5, `isArachnidInsectOrBug` is expecting isArachnid to return the string "Arachnid" but is instead getting a boolean. This will cause isArachnidInsectOrBug to return a boolean rather than one of the three expected strings. To fix this, `isArachnidInsectOrBug` should use the value to return either "Arachnid" or further check for insect or true bug.Bug 7: At line 5, `isArachnidInsectOrBug` will only return if bug is an arachnid. It should return the results of `isInsectOrBug` if not an empty string and otherwise throw an error if insect is none of the three expected results.Without bugs, this is what the function could look like (without accounting for best practices and shortening code):function isArachnidInsectOrBug (arthropod) {
let bugType = "";
if (isArachnid(arthropod)) {
bugType = "Arachnid";
} else {
bugType = isInsectOrBug(arthropod);
}
if (bugType !== "") {
return bugType;
} else {
throw new Error({
arthropod: arthropod,
err: "Arthropod is not an Arachnid, Insect, or True Bug."
})
}
}
function isInsectOrBug(arthropod) {
let bugType = "";
switch (arthropod.mouthType) {
case "sponging":
case "siphoning":
case "chewing":
case "piercing/sucking flexible": {
// Alternatively, the string could be returned here instead of using the break statement and the bugType variable.
bugType = "Insect";
break;
}
case "piercing/sucking rigid": {
bugType = "True Bug";
break;
}
}
return bugType;
}
function isArachnid ({antennae, wingPairs, bodySegments, legs}) {
// Alternatively, the result of the boolean statement in the if statement could be returned directly.
// EX. `return (!antennae && !wingPairs && bodySegments === 2 && legs === 8);`
if (!antennae && !wingPairs && bodySegments === 2 && legs === {
return true;
} else {
return false;
}
}</div></div></noscript></div></div><H2 id="toc-hId-380931688">Python</H2><H3 id="toc-hId--108984824">Easy</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-python"><code>def hello_world();
print "Hello, World!"
hello_world()</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId--430717645">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><SPAN>Bug 1: At line 1, `;` should be `:`.<BR /></SPAN></DIV><DIV><SPAN>Bug 2: At line 2, the print statement should be indented after the function definition on line 1.</SPAN></DIV><DIV><SPAN>Bug 3: At line 2, The string "Hello, World!" should be wrapped in parentheses in call to `print`.</SPAN></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 1, `;` should be `:`.Bug 2: At line 2, the print statement should be indented after the function definition on line 1.Bug 3: At line 2, The string "Hello, World!" should be wrapped in parentheses in call to `print`.</div></div></noscript></div></div><H3 id="toc-hId--333828143">Medium</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-python"><code>from typing import Final
#Store integers 1, 2 and 3 in variables `ONE`, `TWO`, `THREE`
ONE, TWO, THREE = range(1, 3)
ZERO : Final = 0
def check_number (x : int) -> str:
if x <= ONE:
result='smaller than or equal to 1'
elif x = TWO:
result='equal to 2'
then:
result='equal to or greater than 3'
returns result
a=input("Input the integer number: ")
print(f"{a} is {check_number(a)}")</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId--823744655">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 10, boolean operator '==' should be used instead of '='. </SPAN></DIV><DIV><SPAN>Bug 2: At line 12, </SPAN><SPAN>`then`</SPAN><SPAN> should be </SPAN><SPAN>`else`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 3: At line 15, there is an extra </SPAN><SPAN>`s`</SPAN><SPAN> on </SPAN><SPAN>`returns`</SPAN><SPAN>. It should be </SPAN><SPAN>`return result`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 4: At line 4, </SPAN><SPAN>`range(1, 3)`</SPAN><SPAN> will only provide values </SPAN><SPAN>`1`</SPAN><SPAN> and </SPAN><SPAN>`2`</SPAN><SPAN>, which is not enough values for the number of variables provided. Instead, it should be </SPAN><SPAN>`range(1, 4)`</SPAN><SPAN>. </SPAN></DIV><DIV><SPAN>Bug 5: At line 8 and 17, </SPAN><SPAN>`<=`</SPAN><SPAN> is not supported between instances of </SPAN><SPAN>`str`</SPAN><SPAN> (</SPAN><SPAN>`a`</SPAN><SPAN>) and </SPAN><SPAN>`int`</SPAN><SPAN> (</SPAN><SPAN>`x`</SPAN><SPAN>). To fix this, on line 17, it should be </SPAN><SPAN>`a=int(input("Input the integer number: "))`</SPAN><SPAN> to convert a string to an integer.</SPAN></DIV></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 10, boolean operator '==' should be used instead of '='. Bug 2: At line 12, `then` should be `else`.Bug 3: At line 15, there is an extra `s` on `returns`. It should be `return result`.Bug 4: At line 4, `range(1, 3)` will only provide values `1` and `2`, which is not enough values for the number of variables provided. Instead, it should be `range(1, 4)`. Bug 5: At line 8 and 17, `<=` is not supported between instances of `str` (`a`) and `int` (`x`). To fix this, on line 17, it should be `a=int(input("Input the integer number: "))` to convert a string to an integer.</div></div></noscript></div></div><H3 id="toc-hId--726855153">Hard</H3><P> </P><P> </P><P> </P><P> </P><pre class="lia-code-sample language-python"><code>from dataclass import dataclass
class PointInTime:
year : int
month: int
day : int
point = PointInTime(1974, 12, 23)
print(point) # Output should be: PointInTime(year=1974, month=12, day=23)</code></pre><P> </P><P> </P><P> </P><P> </P><H4 id="toc-hId--1216771665">Intended bugs:</H4><div class="lia-spoiler-container"><a class="lia-spoiler-link" href="#" rel="nofollow noopener noreferrer">Spoiler</a><noscript> (Highlight to read)</noscript><div class="lia-spoiler-border"><div class="lia-spoiler-content"><DIV><DIV><SPAN>Bug 1: At line 1, there is no module named 'dataclass'. Instead, it should be </SPAN><SPAN>`from dataclasses import dataclass`</SPAN><SPAN>.</SPAN></DIV><DIV><SPAN>Bug 2: At line 2, before the class </SPAN><SPAN>`PointInTime`</SPAN><SPAN>, there needs to be a decorator, </SPAN><SPAN>`@dataClass`</SPAN><SPAN> as </SPAN><SPAN>`PointInTime()`</SPAN><SPAN> takes no arguments without the decorator.</SPAN></DIV></DIV></div><noscript><div class="lia-spoiler-noscript-container"><div class="lia-spoiler-noscript-content">Bug 1: At line 1, there is no module named 'dataclass'. Instead, it should be `from dataclasses import dataclass`.Bug 2: At line 2, before the class `PointInTime`, there needs to be a decorator, `@dataClass` as `PointInTime()` takes no arguments without the decorator.</div></div></noscript></div></div><H2 id="toc-hId--826479156">Wrap Up</H2><P>I hope everyone had fun. Let us know in the comments if you enjoyed this and want to bring it back next year. Also feel free to share bugs you found that you were proud of or bugs you struggled with. </P><P>While Bugtoberfest might be over, Devtoberfest isn't and there's one more week of content, and another Fun Friday event left! </P>2024-10-21T15:00:00.066000+02:00https://community.sap.com/t5/sap-community/cap-node-js-plugins-1-of-3-how-things-work/ev-p/13922285CAP Node.js Plugins (1 of 3) - How things work2024-10-29T09:56:40.007000+01:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>Hands-on SAP Dev is back! Now that the Devtoberfest and SAP Teched Virtual events are over, it's time to kick off with more live stream episodes, full of curosity-driven learning-by-doing, as is our tradition, right? </P><P>We're going to start off with a three part series that is based on the short live session at SAP TechEd Virtual: <A href="https://www.sap.com/events/teched/virtual/flow/sap/te24/catalog/page/catalog/session/1723584532995001g7Xm" target="_self" rel="noopener noreferrer"><SPAN>DEV100B | Developer keynote [deconstructed]: Keeping the promise</SPAN></A>. In this part, we'll recap and go a little deeper and slower into what we looked at in that DEV100B session. And you can as always ask questions and provide your comments and opinions in the live chat as we go. This will then set us up for the second part, where we'll roll our sleeves up in the REPL and introspect the service. But more on that next time. </P><P><SPAN>See the series post <A href="https://qmacro.org/blog/posts/2024/12/30/cap-node.js-plugins/" target="_self" rel="nofollow noopener noreferrer">CAP Node.js plugins</A> </SPAN><SPAN>for more details and links to all the related resources.</SPAN></P>2024-10-29T09:56:40.007000+01:00https://community.sap.com/t5/sap-community/the-art-and-science-of-cap-part-2-with-daniel-hutzel/ev-p/13940327The Art and Science of CAP (part 2) with Daniel Hutzel2024-11-18T08:55:26.072000+01:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P><SPAN class="">Daniel presented a session at this year's </SPAN><SPAN class=""><A class="" href="https://www.youtube.com/hashtag/devtoberfest" target="" rel="nofollow noopener noreferrer">#Devtoberfest</A></SPAN><SPAN class=""> titled "The Art and Science of CAP", in which he started to take us on a deep dive, with special background insights, into key design aspects and enduring influential software patterns & philosophies that have shaped CAP. This is the first live follow-up episode to that inaugural one.</SPAN></P><P><SPAN>See the blog post <A href="https://qmacro.org/blog/posts/2024/12/06/the-art-and-science-of-cap/" target="_self" rel="nofollow noopener noreferrer">The Art and Science of CAP</A> for all details, notes, previous episodes, links and more.</SPAN></P><P><SPAN class="">To be best prepared for this event, you may wish to watch the first part: <A href="https://www.youtube.com/watch?v=XMchiFnDJ6E" target="_self" rel="nofollow noopener noreferrer">π’ The Art & Science of CAP</A>. </SPAN></P><P><SPAN class=""><SPAN>You may also be interested in </SPAN><A href="https://qmacro.org/blog/posts/2024/11/22/tasc-notes-part-2/" target="_self" rel="nofollow noreferrer noopener">TASC Notes - Part 2</A><SPAN>, a summary of this episode, with links.</SPAN></SPAN></P><P><SPAN class="">In addition, you may want to read the following short blog posts, which explain various gems of insight from that first episode:</SPAN></P><UL><LI><A href="https://qmacro.org/blog/posts/2024/11/02/keeping-things-simple-in-domain-modelling-with-cds/" target="_self" rel="nofollow noopener noreferrer"><SPAN class="">Keeping things simple in domain modelling with CDS</SPAN></A></LI><LI><A href="https://qmacro.org/blog/posts/2024/11/03/restricting-access-via-facets-with-masked-elements/" target="_self" rel="nofollow noopener noreferrer"><SPAN class="">Restricting access via facets with masked elements</SPAN></A></LI><LI><A href="https://qmacro.org/blog/posts/2024/11/04/separating-concerns-and-focusing-on-the-important-stuff/" target="_self" rel="nofollow noopener noreferrer"><SPAN class="">Separating concerns and focusing on the important stuff</SPAN></A></LI><LI><A href="https://qmacro.org/blog/posts/2024/11/08/flattening-the-hierarchy-with-mixins/" target="_self" rel="nofollow noopener noreferrer"><SPAN class="">Flattening the hierarchy with mixins</SPAN></A></LI></UL><P><SPAN class="">See you on Friday!</SPAN></P><P><SPAN class=""><A class="" href="https://www.youtube.com/hashtag/sapcap" target="" rel="nofollow noopener noreferrer">#SAPCAP</A> <A class="" href="https://www.youtube.com/hashtag/tasc" target="" rel="nofollow noopener noreferrer">#TASC</A></SPAN></P><P> </P>2024-11-18T08:55:26.072000+01:00https://community.sap.com/t5/sap-community/the-art-and-science-of-cap-part-3-with-daniel-hutzel/ev-p/13948081The Art and Science of CAP (part 3) with Daniel Hutzel2024-11-25T20:00:13.985000+01:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P><SPAN>Daniel Hutzel continues on his exploration of The Art and Science of CAP, sharing insights and ideas from the origins, philosophy and magic of the SAP Cloud Application Programming Model. </SPAN><A class="" href="https://www.youtube.com/hashtag/sapcap" target="" rel="nofollow noopener noreferrer">#SAPCAP</A> <A class="" href="https://www.youtube.com/hashtag/tasc" target="" rel="nofollow noopener noreferrer">#TASC</A></P><P><SPAN>See the blog post <A href="https://qmacro.org/blog/posts/2024/12/06/the-art-and-science-of-cap/" target="_self" rel="nofollow noopener noreferrer">The Art and Science of CAP</A> for all details, notes, previous episodes, links and more.</SPAN></P>2024-11-25T20:00:13.985000+01:00https://community.sap.com/t5/sap-community/the-art-and-science-of-cap-part-4-with-daniel-hutzel/ev-p/13951774The Art and Science of CAP (part 4) with Daniel Hutzel2024-11-29T12:33:43.843000+01:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P><SPAN>Daniel Hutzel continues on his exploration of The Art and Science of CAP, sharing insights and ideas from the origins, philosophy and magic of the SAP Cloud Application Programming Model. </SPAN><A class="" href="https://www.youtube.com/hashtag/sapcap" target="" rel="nofollow noopener noreferrer">#SAPCAP</A><SPAN> </SPAN><A class="" href="https://www.youtube.com/hashtag/tasc" target="" rel="nofollow noopener noreferrer">#TASC</A></P><P><SPAN>See the blog post <A href="https://qmacro.org/blog/posts/2024/12/06/the-art-and-science-of-cap/" target="_self" rel="nofollow noopener noreferrer">The Art and Science of CAP</A> for all details, notes, previous episodes, links and more.</SPAN></P>2024-11-29T12:33:43.843000+01:00https://community.sap.com/t5/sap-community/the-art-and-science-of-cap-part-5-with-daniel-hutzel/ev-p/13957381The Art and Science of CAP (part 5) with Daniel Hutzel2024-12-06T14:39:44.782000+01:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P><SPAN>Daniel Hutzel continues on his exploration of The Art and Science of CAP, sharing insights and ideas from the origins, philosophy and magic of the SAP Cloud Application Programming Model. </SPAN><A class="" href="https://www.youtube.com/hashtag/sapcap" target="" rel="nofollow noopener noreferrer">#SAPCAP</A><SPAN> </SPAN><A class="" href="https://www.youtube.com/hashtag/tasc" target="" rel="nofollow noopener noreferrer">#TASC</A></P><P><SPAN>See the blog post <A href="https://qmacro.org/blog/posts/2024/12/06/the-art-and-science-of-cap/" target="_self" rel="nofollow noopener noreferrer">The Art and Science of CAP</A> for all details, notes, previous episodes, links and more.</SPAN></P><P> </P>2024-12-06T14:39:44.782000+01:00https://community.sap.com/t5/sap-community/the-art-and-science-of-cap-part-6-with-daniel-hutzel-holiday-season-edition/ev-p/13963130The Art and Science of CAP (part 6) with Daniel Hutzel (Holiday Season edition)2024-12-13T17:13:59.266000+01:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>Daniel Hutzel continues on his exploration of The Art and Science of CAP, sharing insights and ideas from the origins, philosophy and magic of the SAP Cloud Application Programming Model. #SAPCAP #TASC</P><P>See the blog post <A href="https://qmacro.org/blog/posts/2024/12/06/the-art-and-science-of-cap/" target="_self" rel="nofollow noopener noreferrer">The Art and Science of CAP</A> for all details, notes, previous episodes, links and more.</P>2024-12-13T17:13:59.266000+01:00https://community.sap.com/t5/sap-community/cap-node-js-plugins-2-of-3-using-the-repl/ev-p/13973724CAP Node.js Plugins (2 of 3) - Using the REPL2024-12-30T13:53:24.827000+01:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P><SPAN>In this second of a three part series we use the cds REPL to introspect the running service, and explore the entities, elements and annotations, so that we know enough for the third part where we'll write our own plugin. See the series post <A href="https://qmacro.org/blog/posts/2024/12/30/cap-node.js-plugins/" target="_self" rel="nofollow noopener noreferrer">CAP Node.js plugins</A> </SPAN><SPAN>for more details and links to all the related resources.</SPAN></P>2024-12-30T13:53:24.827000+01:00https://community.sap.com/t5/sap-community/cap-node-js-plugins-3-of-3-writing-our-own/ev-p/13973728CAP Node.js Plugins (3 of 3) - Writing our own2024-12-30T13:57:55.493000+01:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P><SPAN class="">In this third of a three part series, having understood how plugins work (in part 1) and learned how to use the cds REPL to explore entities, elements and annotations of a running service (in part 2), we now know enough to write our own plugin which we'll do in this last part. </SPAN><SPAN>See the series post <A href="https://qmacro.org/blog/posts/2024/12/30/cap-node.js-plugins/" target="_self" rel="nofollow noopener noreferrer">CAP Node.js plugins</A> </SPAN><SPAN>for more details and links to all the related resources.</SPAN></P>2024-12-30T13:57:55.493000+01:00https://community.sap.com/t5/technology-blogs-by-members/my-cap-projects-toolbox/bc-p/13978675#M171047Re: My CAP Projects Toolbox2025-01-07T09:02:08.404000+01:00qmacrohttps://community.sap.com/t5/user/viewprofilepage/user-id/53<P>Hi <a href="https://community.sap.com/t5/user/viewprofilepage/user-id/11987">@vvdries</a> , nice post! </P><P>You were <A href="https://community.sap.com/t5/technology-blogs-by-members/my-cap-projects-toolbox/ba-p/13970122#toc-hId-746975420" target="_self">looking for some input</A> on the use of the `cds.odata` functions `urlify` and `parse`. While they both don't begin with an underscore (a conventional way of signifying something is off-limits, as I'm sure you know), they are not explicitly documented in Capire* and are therefore deemed to be not for external use. Of course, digging in to the source code and <EM>learning</EM> about these functions (and how they work, and perhaps more importantly how they also help to clarify the relationship between CQN and the OData protocol adapter, in this example) is great.</P><P>*There is one reference, as far as I can find, but it's just in passing and only in <A href="https://github.tools.sap/cap/docs/blob/8b0e218580a884ed7ac9c52767dde9e37ba13dcc/releases/changelog/2023.md#:%7E:text=%5Bcds%406.5.0%5D%20Generation%20of%20odata%2Dv2%20URL%20in%20case%20of%20select%3D*%20in%20urlify()" target="_self" rel="nofollow noopener noreferrer">a release note entry</A></P><P>HTH!</P><P>DJ</P>2025-01-07T09:02:08.404000+01:00