Categories
Misc Silly Wise Tips What have I learned?

How to know when one Udemy course was created

Many times, when you purchase a course on that platform, (specially software related ones), you could find they are quite old and outdated to the point you could spend more time fixing deprecated methods, fixing errors… than actually doing the course. Must say that fixing errors is sometimes a good way to learn, but usually we expect that the authors update them more often.

Unfortunately that is not always the case, and worse, those authors sometimes update the title of the course to reflect the current year or one framework’s / programming language´s latest version in an attempt to hide the outdated concepts and get more sales.

Now it seems it is not possible to see when a course was created, just the last update.

last-update-udemy-caption

But there is a way to find when it was actually created using the Udemy API. We can use our preferred api platform to perform the request. I use Postman.

We must make a request to the following endpoint:

https://www.udemy.com/api-2.0/courses/COURSE_ID/?fields[course]=title,url,created

We need just to change COURSE_ID with the actual id of the course. How can we find it?

Go to the course´s main page, right click and select View page source (you can open it with CTRL + U ). Once you are there, use CTRL + F and look for the attribute called data-clp-course-id, where you will find the course id.

Once you change COURSE_ID with the id you are have been provided, perform the request and if everything goes fine you will get a response with a field called “created”, where you can see the course creation date.

created-field-udemy-api-response

Hope it helps.

 

Categories
Angular HTML Javascript Silly Wise Tips

Silly Wise Tip: How to make a comment on an Angular .HTML template which is not outputted

When you are used to the way of commenting on most of programming languages (usually with // or /* */ ) you can a find a bit nerving when you have to write a comment on an HTML template with our old friend <!– –>

It is not so handy, takes more time and it will be outputted on the .HTML template.

So in case you want a much more confortable, faster way to add a comment, with the plus that it won´t be outputted on the template and only you or other developers will read it, you can use this tricky solution I found on Stack Overflow. Is ugly but it works.

https://stackoverflow.com/questions/18063475/how-can-i-add-a-comment-for-developers-not-in-output-html-to-an-angular-templ

Since there still does not seem to be template syntax support for (non-html) comments the easiest way I found to do this is abusing the support for one line js comments in embedded expressions. Like this:

{{ '' // my comment }}

The empty string literal – which makes this even more ugly than it already is – is necessary because without it the angular compiler barfs out a ‘ERROR in TypeError: Cannot read property ‘visit’ of undefined’, at least with the 9.0.0 version I am on.

Categories
Silly Wise Tips Wordpress

Silly Wise Tips: how to stop text from being a link when writing on wordpress

silly-man

 

Sometimes I found that, when I am writing a post, and I add a link, it is hard to stop the link on the next characters  like happened to me on this example.

The shortest thing, opn my ignorance, I found to do it is going to the text tab on the editor page

text-tab

There you can easily skip the </a> tag (which marks the end of a link, and start writing there:

link-tag-termination

Easy ans silly? YEAH, BUT I FEEL SO PROUD 🙂

Image from: Ryan McGuire on Pixabay